class Intrinio::API

Provides access to all the Intrinio API endpoints with dynamic methods anc caching.

Attributes

password[R]
username[R]

Public Class Methods

new(opts={}) click to toggle source
# File lib/intrinio/api.rb, line 11
def initialize(opts={})
  if opts[:auth] 
    opts[:username], opts[:password] = opts[:auth].split ':'
    opts.delete :auth
  end

  @username, @password = opts[:username], opts[:password]

  cache.disable unless opts[:use_cache]
  cache.dir = opts[:cache_dir] if opts[:cache_dir]
  cache.life = opts[:cache_life] if opts[:cache_life]
end

Public Instance Methods

default_params() click to toggle source
# File lib/intrinio/api.rb, line 24
def default_params
  { basic_auth: { username: username, password: password } }
end