Class: Hackeroo::Client

Inherits:
Object
  • Object
show all
Includes:
API::Artists, API::Performances, API::Stages, API::Users, Configurable
Defined in:
lib/hackeroo/client.rb

Overview

Note:

All methods have been separated into modules and follow the same grouping used in the Hackeroo API Documentation.

Wrapper for the Hackeroo REST API

Constant Summary

Constants included from API::Artists

API::Artists::MAX_USERS_PER_REQUEST

Constants included from API::Utils

API::Utils::DEFAULT_CURSOR

Constants included from API::Stages

API::Stages::MAX_USERS_PER_REQUEST

Constants included from API::Performances

API::Performances::MAX_USERS_PER_REQUEST

Constants included from API::Users

API::Users::MAX_USERS_PER_REQUEST

Instance Attribute Summary

Attributes included from Configurable

#clientkey, #connection_options, #endpoint, #identity_map, #middleware

Instance Method Summary collapse

Methods included from Configurable

#bearer_token?, #configure, #credentials?, keys, #reset!, #user_token?

Methods included from API::Artists

#artists

Methods included from API::Stages

#stages

Methods included from API::Performances

#performances

Methods included from API::Users

#update_delivery_device, #user

Constructor Details

#initialize(options = {}) ⇒ Hackeroo::Client

Initializes a new Client object

Parameters:

  • options (Hash) (defaults to: {})


29
30
31
32
33
# File 'lib/hackeroo/client.rb', line 29

def initialize(options={})
  Hackeroo::Configurable.keys.each do |key|
    instance_variable_set(:"@#{key}", options[key] || Hackeroo.instance_variable_get(:"@#{key}"))
  end
end

Instance Method Details

#get(path, params = {}) ⇒ Object

Perform an HTTP GET request



36
37
38
# File 'lib/hackeroo/client.rb', line 36

def get(path, params={})
  request(:get, path, params)
end