Class: Yandex::Direct::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/yandex_direct/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token, login, app_id, locale = :en) ⇒ Api

Returns a new instance of Api.



22
23
24
# File 'lib/yandex_direct/api.rb', line 22

def initialize(token, , app_id, locale = :en)
  @token, @login, @app_id, @locale = token, , app_id, locale
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, param = nil) ⇒ Object



26
27
28
# File 'lib/yandex_direct/api.rb', line 26

def method_missing(method, param = nil)
  request method.to_s.camelize, param
end

Instance Attribute Details

#app_idObject (readonly)

Returns the value of attribute app_id.



20
21
22
# File 'lib/yandex_direct/api.rb', line 20

def app_id
  @app_id
end

#localeObject (readonly)

Returns the value of attribute locale.



20
21
22
# File 'lib/yandex_direct/api.rb', line 20

def locale
  @locale
end

#loginObject (readonly)

Returns the value of attribute login.



20
21
22
# File 'lib/yandex_direct/api.rb', line 20

def 
  @login
end

#tokenObject (readonly)

Returns the value of attribute token.



20
21
22
# File 'lib/yandex_direct/api.rb', line 20

def token
  @token
end