lib/kentaa/api/clients/actions.rb in kentaa-api-0.2.1 vs lib/kentaa/api/clients/actions.rb in kentaa-api-0.3.0
- old
+ new
@@ -5,16 +5,16 @@
module Clients
class Actions < Base
include Kentaa::Api::Clients::All
def list(options = {})
- response = request.get("/actions", options)
- Kentaa::Api::Resources::Actions.new(config, response)
+ actions = Kentaa::Api::Resources::Actions.new(config, options)
+ actions.load
end
- def get(id)
- response = request.get("/actions/#{id}")
- Kentaa::Api::Resources::Action.new(config, response)
+ def get(id, options = {})
+ action = Kentaa::Api::Resources::Action.new(config, options.merge(id: id))
+ action.load
end
end
end
end
end