Module: Foursquare2::Specials
- Included in:
- Client
- Defined in:
- lib/foursquare2/specials.rb
Instance Method Summary collapse
-
#add_special(options = {}) ⇒ Object
Add a special for venue managers Details on param options can be found at developer.foursquare.com/docs/specials/add.
-
#search_specials(options = {}) ⇒ Object
Search for specials.
-
#special(special_id) ⇒ Object
Retrieve information about a special.
Instance Method Details
#add_special(options = {}) ⇒ Object
Add a special for venue managers Details on param options can be found at developer.foursquare.com/docs/specials/add
45 46 47 48 49 50 |
# File 'lib/foursquare2/specials.rb', line 45 def add_special(={}) response = connection.post do |req| req.url "specials/add", end return_error_or_body(response, response.body.response.special) end |
#search_specials(options = {}) ⇒ Object
Search for specials
22 23 24 25 26 27 |
# File 'lib/foursquare2/specials.rb', line 22 def search_specials(={}) response = connection.get do |req| req.url "specials/search", end return_error_or_body(response, response.body.response.specials.items) end |
#special(special_id) ⇒ Object
Retrieve information about a special
param [String] special_id The ID of the special
8 9 10 11 |
# File 'lib/foursquare2/specials.rb', line 8 def special(special_id) response = connection.get("specials/#{special_id}") return_error_or_body(response, response.body.response.special) end |