Class: TrustedSearch::V2::Location
- Inherits:
-
ApiVersion2
- Object
- APIResource
- Api
- ApiVersion2
- TrustedSearch::V2::Location
- Defined in:
- lib/trustedsearch/v2/locations.rb
Instance Attribute Summary collapse
-
#resource ⇒ Object
Returns the value of attribute resource.
Instance Method Summary collapse
-
#index ⇒ Object
Retrieve an array of all available hooks.
-
#initialize ⇒ Location
constructor
A new instance of Location.
-
#listings(location_id = nil) ⇒ Object
Get the details of a single hook.
Methods inherited from ApiVersion2
Methods inherited from APIResource
#base_path, #class_name, #delete, #end_point, #get, #get_time, #has_keys, #post, #process, #put, #request, #sign_request
Constructor Details
#initialize ⇒ Location
Returns a new instance of Location.
6 7 8 |
# File 'lib/trustedsearch/v2/locations.rb', line 6 def initialize @resource = 'locations' end |
Instance Attribute Details
#resource ⇒ Object
Returns the value of attribute resource.
4 5 6 |
# File 'lib/trustedsearch/v2/locations.rb', line 4 def resource @resource end |
Instance Method Details
#index ⇒ Object
Retrieve an array of all available hooks
11 12 13 14 |
# File 'lib/trustedsearch/v2/locations.rb', line 11 def index() method_url = @resource return self.get(method_url) end |
#listings(location_id = nil) ⇒ Object
Get the details of a single hook
17 18 19 20 21 |
# File 'lib/trustedsearch/v2/locations.rb', line 17 def listings(location_id = nil) method_url = @resource + "/" + location_id + "/listings" params = {} return self.get(method_url, params) end |