class OrchestrateIo::Event
Attributes
request[R]
Public Class Methods
new(client, method, &block)
click to toggle source
Usage¶ ↑
io = OrchestrateIo.new
(api_key: “abc”) request = io.event :get do
collection 'films' key 'the_godfather' type 'comments'
end
request.perform
> HTTParty::Response¶ ↑
# File lib/orchestrate.io/event.rb, line 20 def initialize(client, method, &block) args = { client: client, http_method: method, uri: uri, options: options } @request = OrchestrateIo::Request.new(args, &block) end
Public Instance Methods
perform()
click to toggle source
# File lib/orchestrate.io/event.rb, line 31 def perform request.perform end
Protected Instance Methods
options()
click to toggle source
# File lib/orchestrate.io/event.rb, line 41 def options options = {} options[:body] = :data options[:query] = { timestamp: :timestamp, start: :from, end: :to } options end
uri()
click to toggle source
# File lib/orchestrate.io/event.rb, line 37 def uri "/:version/:collection/:key/events/:type" end