module RubyKong::Plugin
Public Class Methods
create(*args)
click to toggle source
Params: api:,
plugin: {name:, consumer_id: nil, config.{property}}
Usage: RubyKong::Plugin.create
api: ‘shipit’,
plugin: {name: 'key-auth'}
# File lib/ruby-kong/plugin.rb, line 11 def create(*args) RubyKong::Request::Plugin.create args[0] end
delete(*args)
click to toggle source
Params: id, name
Usage: RubyKong::Plugin.update
name: ‘shipit’,
upstream_url: 'https://api.shipit.vn/v2/'
# File lib/ruby-kong/plugin.rb, line 65 def delete(*args) RubyKong::Request::Plugin.delete args[0] end
list(*args)
click to toggle source
Params: id, name, api_id, consumer_id, size, offset
Usage: RubyKong::Plugin.list
# File lib/ruby-kong/plugin.rb, line 18 def list(*args) RubyKong::Request::Plugin.list args[0] end
list_by_api(*args)
click to toggle source
Params: api: id,
filter: {name, api_id, consumer_id, size, offset}
Usage: RubyKong::Plugin.list_by_api
api: ‘shipit’,
filter: {name: 'key-auth'}
# File lib/ruby-kong/plugin.rb, line 27 def list_by_api(*args) RubyKong::Request::Plugin.list_by_api args[0] end
retrieve(*args)
click to toggle source
Params: id
Usage: RubyKong::Plugin.retrieve
id: ‘90e6e8f4-2d51-444d-ac28-3f1dc1b3b3ed’
# File lib/ruby-kong/plugin.rb, line 34 def retrieve(*args) RubyKong::Request::Plugin.retrieve args[0] end
retrieve_enabled(*args)
click to toggle source
Usage: RubyKong::Plugin.retrieve_enabled
# File lib/ruby-kong/plugin.rb, line 40 def retrieve_enabled(*args) RubyKong::Request::Plugin.retrieve_enabled args[0] end
retrieve_schema(*args)
click to toggle source
Params: plugin_name
Usage: RubyKong::Plugin.retrieve_schema
plugin_name: ‘basic_auth’
# File lib/ruby-kong/plugin.rb, line 47 def retrieve_schema(*args) RubyKong::Request::Plugin.retrieve_schema args[0] end
update(*args)
click to toggle source
Params: api:, plugin:,
params: {name:, consumer_id:, config.{property}}
Usage: RubyKong::Plugin.update
api: ‘shipit’,
plugin: '90e6e8f4-2d51-444d-ac28-3f1dc1b3b3ed' params: {name: 'basic-auth'}
# File lib/ruby-kong/plugin.rb, line 57 def update(*args) RubyKong::Request::Plugin.update args[0] end