Module: FoursquareNext::Specials
- Included in:
- Client
- Defined in:
- lib/foursquare_next/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, options = {}) ⇒ 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
46 47 48 49 50 51 |
# File 'lib/foursquare_next/specials.rb', line 46 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
23 24 25 26 27 28 |
# File 'lib/foursquare_next/specials.rb', line 23 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, options = {}) ⇒ Object
Retrieve information about a special
param [String] special_id The ID of the special
7 8 9 10 11 12 |
# File 'lib/foursquare_next/specials.rb', line 7 def special(special_id, ={}) response = connection.get do |req| req.url "specials/#{special_id}", end return_error_or_body(response, response.body.response.special) end |