Module: RubyKong::Plugin
- Defined in:
- lib/ruby-kong/plugin.rb
Class Method Summary collapse
-
.create(*args) ⇒ Object
Params: api:, plugin: consumer_id: nil, config.{property}.
-
.delete(*args) ⇒ Object
Params: id, name.
-
.list(*args) ⇒ Object
Params: id, name, api_id, consumer_id, size, offset.
-
.list_by_api(*args) ⇒ Object
Params: api: id, filter: api_id, consumer_id, size, offset.
-
.retrieve(*args) ⇒ Object
Params: id.
-
.retrieve_enabled(*args) ⇒ Object
Usage: RubyKong::Plugin.retrieve_enabled.
-
.retrieve_schema(*args) ⇒ Object
Params: plugin_name.
-
.update(*args) ⇒ Object
Params: api:, plugin:, params: consumer_id:, config.{property}.
Class Method Details
.create(*args) ⇒ Object
Params: api:,
plugin: {name:, consumer_id: nil, config.{property}}
Usage: RubyKong::Plugin.create api: ‘shipit’,
plugin: {name: 'key-auth'}
11 12 13 |
# File 'lib/ruby-kong/plugin.rb', line 11 def create(*args) RubyKong::Request::Plugin.create args[0] end |
.delete(*args) ⇒ Object
Params: id, name
Usage: RubyKong::Plugin.update name: ‘shipit’,
upstream_url: 'https://api.shipit.vn/v2/'
65 66 67 |
# File 'lib/ruby-kong/plugin.rb', line 65 def delete(*args) RubyKong::Request::Plugin.delete args[0] end |
.list(*args) ⇒ Object
Params: id, name, api_id, consumer_id, size, offset
Usage: RubyKong::Plugin.list
18 19 20 |
# File 'lib/ruby-kong/plugin.rb', line 18 def list(*args) RubyKong::Request::Plugin.list args[0] end |
.list_by_api(*args) ⇒ Object
Params: api: id,
filter: {name, api_id, consumer_id, size, offset}
Usage: RubyKong::Plugin.list_by_api api: ‘shipit’,
filter: {name: 'key-auth'}
27 28 29 |
# File 'lib/ruby-kong/plugin.rb', line 27 def list_by_api(*args) RubyKong::Request::Plugin.list_by_api args[0] end |
.retrieve(*args) ⇒ Object
Params: id
Usage: RubyKong::Plugin.retrieve id: ‘90e6e8f4-2d51-444d-ac28-3f1dc1b3b3ed’
34 35 36 |
# File 'lib/ruby-kong/plugin.rb', line 34 def retrieve(*args) RubyKong::Request::Plugin.retrieve args[0] end |
.retrieve_enabled(*args) ⇒ Object
Usage: RubyKong::Plugin.retrieve_enabled
40 41 42 |
# File 'lib/ruby-kong/plugin.rb', line 40 def retrieve_enabled(*args) RubyKong::Request::Plugin.retrieve_enabled args[0] end |
.retrieve_schema(*args) ⇒ Object
Params: plugin_name
Usage: RubyKong::Plugin.retrieve_schema plugin_name: ‘basic_auth’
47 48 49 |
# File 'lib/ruby-kong/plugin.rb', line 47 def retrieve_schema(*args) RubyKong::Request::Plugin.retrieve_schema args[0] end |
.update(*args) ⇒ Object
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'}
57 58 59 |
# File 'lib/ruby-kong/plugin.rb', line 57 def update(*args) RubyKong::Request::Plugin.update args[0] end |