Class: MagLoft::Api

Inherits:
Dialers::Wrapper
  • Object
show all
Defined in:
lib/magloft/api.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#tokenObject

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_callerObject



23
24
25
# File 'lib/magloft/api.rb', line 23

def api_caller
  @api_caller ||= ApiCaller.new
end

#typeloft_blocksObject



35
36
37
# File 'lib/magloft/api.rb', line 35

def typeloft_blocks
  TypeloftBlock
end

#typeloft_templatesObject



31
32
33
# File 'lib/magloft/api.rb', line 31

def typeloft_templates
  TypeloftTemplate
end

#typeloft_themesObject



27
28
29
# File 'lib/magloft/api.rb', line 27

def typeloft_themes
  TypeloftTheme
end