module RubyKong::Request::Consumer
Public Class Methods
create(*args)
click to toggle source
# File lib/ruby-kong/request/consumer.rb, line 5 def create(*args) path = RubyKong.paths[:consumer][:create] Request.post(path, args[0]) end
delete(*args)
click to toggle source
# File lib/ruby-kong/request/consumer.rb, line 27 def delete(*args) resource = args[0][:username] || args[0][:id] path = RubyKong.paths[:consumer][:update] + resource Request.delete(path, args[0]) end
list(*args)
click to toggle source
# File lib/ruby-kong/request/consumer.rb, line 10 def list(*args) path = RubyKong.paths[:consumer][:list] Request.get(path, args[0]) end
retrieve(*args)
click to toggle source
# File lib/ruby-kong/request/consumer.rb, line 15 def retrieve(*args) resource = args[0][:username] || args[0][:id] path = RubyKong.paths[:consumer][:retrieve] + resource Request.get(path) end
update(*args)
click to toggle source
# File lib/ruby-kong/request/consumer.rb, line 21 def update(*args) resource = args[0][:username] || args[0][:id] path = RubyKong.paths[:consumer][:update] + resource Request.patch(path, args[0]) end