Module: ActiveResource::Extend::AuthWithApiKey::ClassMethods
- Defined in:
- lib/ares/add_api_key.rb
Instance Method Summary collapse
- #api_key ⇒ Object
- #api_key=(api_key) ⇒ Object
- #collection_path_with_auth(*args) ⇒ Object
- #custom_method_collection_url_with_auth(*args) ⇒ Object
- #element_path_with_auth(*args) ⇒ Object
- #new_element_path_with_auth(*args) ⇒ Object
Instance Method Details
#api_key ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/ares/add_api_key.rb', line 21 def api_key # Not using superclass_delegating_reader. See +site+ for explanation if defined?(@api_key) @api_key elsif superclass != Object && superclass.api_key superclass.api_key.dup.freeze end end |
#api_key=(api_key) ⇒ Object
30 31 32 |
# File 'lib/ares/add_api_key.rb', line 30 def api_key=(api_key) @api_key = api_key end |
#collection_path_with_auth(*args) ⇒ Object
13 14 15 |
# File 'lib/ares/add_api_key.rb', line 13 def collection_path_with_auth(*args) collection_path_without_auth(*args).concat("?Ft-Api-Key=#{self.api_key}") end |
#custom_method_collection_url_with_auth(*args) ⇒ Object
17 18 19 |
# File 'lib/ares/add_api_key.rb', line 17 def custom_method_collection_url_with_auth(*args) custom_method_collection_url_without_auth(*args).concat("?Ft-Api-Key=#{self.api_key}") end |
#element_path_with_auth(*args) ⇒ Object
5 6 7 |
# File 'lib/ares/add_api_key.rb', line 5 def element_path_with_auth(*args) element_path_without_auth(*args).concat("?Ft-Api-Key=#{self.api_key}") end |
#new_element_path_with_auth(*args) ⇒ Object
9 10 11 |
# File 'lib/ares/add_api_key.rb', line 9 def new_element_path_with_auth(*args) new_element_path_without_auth(*args).concat("?Ft-Api-Key=#{self.api_key}") end |