Class: TheCity::AdminApi
- Inherits:
-
Object
- Object
- TheCity::AdminApi
- Defined in:
- lib/the_city_admin.rb
Class Attribute Summary collapse
-
.api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
.api_token ⇒ Object
readonly
Returns the value of attribute api_token.
Class Method Summary collapse
Class Attribute Details
.api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
32 33 34 |
# File 'lib/the_city_admin.rb', line 32 def api_key @api_key end |
.api_token ⇒ Object (readonly)
Returns the value of attribute api_token.
32 33 34 |
# File 'lib/the_city_admin.rb', line 32 def api_token @api_token end |
Class Method Details
.connect(admin_api_key, admin_api_token) ⇒ Object
35 36 37 38 39 |
# File 'lib/the_city_admin.rb', line 35 def self.connect(admin_api_key, admin_api_token) raise TheCityExceptions::UnableToConnectToTheCity.new('Key and Token cannot be nil.') if admin_api_key.nil? or admin_api_token.nil? @api_key = admin_api_key @api_token = admin_api_token end |