Class: Singleplatform::Client
- Inherits:
-
Object
- Object
- Singleplatform::Client
- Defined in:
- lib/singleplatform/client.rb,
lib/singleplatform/client/menus.rb,
lib/singleplatform/client/photos.rb,
lib/singleplatform/client/locations.rb
Defined Under Namespace
Modules: Locations, Menus, Photos
Constant Summary collapse
- BASE_URL =
'http://publishing-api.singleplatform.com'
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Singleplatform::Client
constructor
Initializes a new API Client Object.
Methods included from Photos
#photos_for, #photos_updated_since
Methods included from Menus
Methods included from Locations
#all_for, #location, #locations_updated_since
Constructor Details
#initialize(args = {}) ⇒ Singleplatform::Client
Initializes a new API Client Object
23 24 25 26 27 28 |
# File 'lib/singleplatform/client.rb', line 23 def initialize(args = {}) @base_url = BASE_URL @client_id = args[:client_id] @client_secret = args[:client_secret] raise Error::MissingCredentialsError if credentials_missing? end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
12 13 14 |
# File 'lib/singleplatform/client.rb', line 12 def base_url @base_url end |
#client_id ⇒ Object
Returns the value of attribute client_id.
12 13 14 |
# File 'lib/singleplatform/client.rb', line 12 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
12 13 14 |
# File 'lib/singleplatform/client.rb', line 12 def client_secret @client_secret end |