class TicketingHub::Client
Public Class Methods
from_oauth_password(email, password)
click to toggle source
# File lib/ticketing_hub/client.rb, line 12 def self.from_oauth_password(email, password) token = TicketingHub.post 'oauth/token', { grant_type: 'password', username: email, password: password, client_id: TicketingHub.client_id, client_secret: TicketingHub.client_secret } new(access_token: token.access_token, refresh_token: token.refresh_token, expires_at: Time.now + token.expires_in) end
new(options={})
click to toggle source
# File lib/ticketing_hub/client.rb, line 18 def initialize(options={}) options = TicketingHub.options.merge options Configuration::VALID_OPTIONS_KEYS.each do |key| send "#{key}=", options[key] end end
Public Instance Methods
user()
click to toggle source
# File lib/ticketing_hub/client.rb, line 29 def user get('user').first end
venues()
click to toggle source
# File lib/ticketing_hub/client.rb, line 25 def venues get 'venues', {}, TicketingHub::Venue end