class OrchestrateIo::KeyValue

Attributes

request[R]

Public Class Methods

new(client, method, &block) click to toggle source

Usage

io = OrchestrateIo.new(api_key: “abc”) request = io.key_value :get do

collection  'films'
key         'kurosawa'

end

request.perform

> HTTParty::Response

# File lib/orchestrate.io/key_value.rb, line 19
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/key_value.rb, line 30
def perform
  request.perform
end

Protected Instance Methods

options() click to toggle source
# File lib/orchestrate.io/key_value.rb, line 40
def options
  options = {}
  options[:body] = :data
  options
end
uri() click to toggle source
# File lib/orchestrate.io/key_value.rb, line 36
def uri
  "/:version/:collection/:key"
end