class Caplinked::Client

Attributes

api_host[RW]
api_key[RW]
api_scheme[RW]
api_secret_key[RW]
api_user_token[RW]

Public Class Methods

new(options = {}) { |self| ... } click to toggle source

Usage: client = Caplinked::Client.new api_key: '…', api_host: 'sandbox.caplinked.com' client.upload_file file_name: '…',

# File lib/caplinked/client.rb, line 17
def initialize(options = {})
  options[:api_key] ||= ''
  options[:api_secret_key] ||= ''
  options[:api_user_token] ||= ''
  options[:api_host] ||= 'sandbox.caplinked.com'
  options[:api_scheme] ||= 'https'

  options.each do |key, value|
    instance_variable_set "@#{key}", value
  end
  yield(self) if block_given?
end