Class: MagLoft::Api
- Inherits:
-
Dialers::Wrapper
- Object
- Dialers::Wrapper
- MagLoft::Api
- Defined in:
- lib/magloft/api.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
Returns the value of attribute token.
Class Method Summary collapse
Instance Method Summary collapse
- #api_caller ⇒ Object
-
#initialize(token) ⇒ Api
constructor
A new instance of Api.
- #typeloft_blocks ⇒ Object
- #typeloft_templates ⇒ Object
- #typeloft_themes ⇒ Object
Constructor Details
#initialize(token) ⇒ Api
Returns a new instance of Api.
19 20 21 |
# File 'lib/magloft/api.rb', line 19 def initialize(token) @token = token end |
Instance Attribute Details
#token ⇒ Object
Returns the value of attribute token.
13 14 15 |
# File 'lib/magloft/api.rb', line 13 def token @token end |
Class Method Details
.client(token = nil) ⇒ Object
15 16 17 |
# File 'lib/magloft/api.rb', line 15 def self.client(token = nil) @client ||= self.new(token) end |
Instance Method Details
#api_caller ⇒ Object
23 24 25 |
# File 'lib/magloft/api.rb', line 23 def api_caller @api_caller ||= ApiCaller.new end |
#typeloft_blocks ⇒ Object
35 36 37 |
# File 'lib/magloft/api.rb', line 35 def typeloft_blocks TypeloftBlock end |
#typeloft_templates ⇒ Object
31 32 33 |
# File 'lib/magloft/api.rb', line 31 def typeloft_templates TypeloftTemplate end |
#typeloft_themes ⇒ Object
27 28 29 |
# File 'lib/magloft/api.rb', line 27 def typeloft_themes TypeloftTheme end |