Module: RubyKong::Request::Api
- Defined in:
- lib/ruby-kong/request/api.rb
Defined Under Namespace
Classes: Stub
Class Method Summary collapse
- .create(*args) ⇒ Object
- .delete(*args) ⇒ Object
- .list(*args) ⇒ Object
- .retrieve(*args) ⇒ Object
- .update(*args) ⇒ Object
Class Method Details
.create(*args) ⇒ Object
5 6 7 8 |
# File 'lib/ruby-kong/request/api.rb', line 5 def create(*args) path = RubyKong.paths[:api][:create] Request.post(path, args[0]) end |
.delete(*args) ⇒ Object
27 28 29 30 31 |
# File 'lib/ruby-kong/request/api.rb', line 27 def delete(*args) resource = args[0][:name] || args[0][:id] path = RubyKong.paths[:api][:update] + resource Request.delete(path, args[0]) end |
.list(*args) ⇒ Object
10 11 12 13 |
# File 'lib/ruby-kong/request/api.rb', line 10 def list(*args) path = RubyKong.paths[:api][:list] Request.get(path, args[0]) end |