Module: AirbnbApi::Service::ClassMethods
Instance Attribute Summary collapse
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#path ⇒ Object
Returns the value of attribute path.
-
#requires_oauth_token ⇒ Object
readonly
Returns the value of attribute requires_oauth_token.
Instance Method Summary collapse
- #can_use_client?(client) ⇒ Boolean
- #require_oauth_token ⇒ Object
- #requires_oauth_token? ⇒ Boolean
- #set_parameter(parameter, default) ⇒ Object
- #set_path(path) ⇒ Object
Instance Attribute Details
#parameters ⇒ Object
Returns the value of attribute parameters.
12 13 14 |
# File 'lib/airbnb_api/service.rb', line 12 def parameters @parameters end |
#path ⇒ Object
Returns the value of attribute path.
12 13 14 |
# File 'lib/airbnb_api/service.rb', line 12 def path @path end |
#requires_oauth_token ⇒ Object (readonly)
Returns the value of attribute requires_oauth_token.
13 14 15 |
# File 'lib/airbnb_api/service.rb', line 13 def requires_oauth_token @requires_oauth_token end |
Instance Method Details
#can_use_client?(client) ⇒ Boolean
27 28 29 |
# File 'lib/airbnb_api/service.rb', line 27 def can_use_client?(client) requires_oauth_token? == client.oauth_token? end |
#require_oauth_token ⇒ Object
23 24 25 |
# File 'lib/airbnb_api/service.rb', line 23 def require_oauth_token @requires_oauth_token = true end |
#requires_oauth_token? ⇒ Boolean
31 32 33 |
# File 'lib/airbnb_api/service.rb', line 31 def requires_oauth_token? @requires_oauth_token == true end |
#set_parameter(parameter, default) ⇒ Object
18 19 20 21 |
# File 'lib/airbnb_api/service.rb', line 18 def set_parameter(parameter, default) @parameters ||= {} @parameters[parameter.to_sym] = default end |
#set_path(path) ⇒ Object
14 15 16 |
# File 'lib/airbnb_api/service.rb', line 14 def set_path(path) @path = path end |