class BancboxInvest

Constants

METHODS

Attributes

bancbox_api_key[RW]
bancbox_api_secret[RW]
bancbox_api_url[RW]

Public Class Methods

new(options = {}) { |self| ... } click to toggle source
# File lib/bancbox_invest.rb, line 16
def initialize(options = {})
  options.each do |key, value|
    send(:"#{key}=", value)
  end
  yield(self) if block_given?
  @options = credentials
end

Public Instance Methods

credentials() click to toggle source
# File lib/bancbox_invest.rb, line 24
def credentials
  {
    api_key: bancbox_api_key,
    secret:  bancbox_api_secret,
  }
end
post(url, options) click to toggle source
# File lib/bancbox_invest.rb, line 31
def post(url, options)
  HTTParty.post(bancbox_api_url+url, query: options)
end