Class: Hoi

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/hoi.rb

Direct Known Subclasses

SMS

Defined Under Namespace

Classes: SMS

Constant Summary collapse

VERSION =
'0.0.3'
@@app_id =
nil
@@access_token =
nil
@@test_mode =
false

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app_id = nil, access_token = nil, extra_params = {}) ⇒ Hoi

Returns a new instance of Hoi.



21
22
23
24
# File 'lib/hoi.rb', line 21

def initialize(app_id = nil, access_token = nil, extra_params = {})
  @@app_id = app_id || ENV['HOIIO_APP_ID'] || @@app_id
  @@access_token = access_token || ENV['HOIIO_ACCESS_TOKEN'] || @@access_token
end

Class Attribute Details

.access_tokenObject

Returns the value of attribute access_token.



53
54
55
# File 'lib/hoi.rb', line 53

def access_token
  @access_token
end

.app_idObject

Returns the value of attribute app_id.



53
54
55
# File 'lib/hoi.rb', line 53

def app_id
  @app_id
end

.test_modeObject

Returns the value of attribute test_mode.



53
54
55
# File 'lib/hoi.rb', line 53

def test_mode
  @test_mode
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



15
16
17
# File 'lib/hoi.rb', line 15

def access_token
  @access_token
end

#app_idObject

Returns the value of attribute app_id.



15
16
17
# File 'lib/hoi.rb', line 15

def app_id
  @app_id
end

#test_modeObject

Returns the value of attribute test_mode.



15
16
17
# File 'lib/hoi.rb', line 15

def test_mode
  @test_mode
end

#throws_exceptionsObject

Returns the value of attribute throws_exceptions.



15
16
17
# File 'lib/hoi.rb', line 15

def throws_exceptions
  @throws_exceptions
end

#timeoutObject

Returns the value of attribute timeout.



15
16
17
# File 'lib/hoi.rb', line 15

def timeout
  @timeout
end