module Vhx
Constants
- API_BASE_URL
- VERSION
Public Class Methods
client()
click to toggle source
# File lib/vhx.rb, line 55 def client @client end
client=(new_client)
click to toggle source
# File lib/vhx.rb, line 59 def client=(new_client) @client = new_client end
config(config = {})
click to toggle source
# File lib/vhx.rb, line 47 def config(config = {}) @client_id = config[:client_id] @client_secret = config[:client_secret] @api_key = config[:api_key] @auto_refresh = config[:auto_refresh] || false @api_base_url = config[:api_base] end
connection()
click to toggle source
# File lib/vhx.rb, line 63 def connection client ? client.connection : nil end
setup(options = {})
click to toggle source
# File lib/vhx.rb, line 38 def setup(options = {}) options[:client_id] ||= @client_id options[:client_secret] ||= @client_secret options[:api_key] ||= @api_key options[:api_base] ||= @api_base_url options[:auto_refresh] = @auto_refresh || false Vhx.client = Vhx::Client.new(options) end