class Ramco

Constants

VERSION

Attributes

connection[R]

Public Class Methods

api_key(api_key, api_url = nil) click to toggle source
# File lib/ramco.rb, line 30
def self.api_key(api_key, api_url = nil)
  options = {:api_key => api_key}
  options[:api_url] = api_url if api_url
  Ramco.new  options
end
new(options = {}, &block) click to toggle source
# File lib/ramco.rb, line 24
def initialize(options = {}, &block)
  @options = options
  @block = block if block
  return @connection = Ramco::Connection.new(options, &block) 
end

Private Instance Methods

request(connection, params) click to toggle source
# File lib/ramco.rb, line 38
def request(connection, params)
  connection.post do |req|
    req.headers['Content-Type'] = 'application/x-www-form-urlencoded'
    req.body = params.merge({"key" => connection.api_key})
  end.body["Data"]
end