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, 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
47 48 49 50 51 52 |
# File 'lib/foursquare2/specials.rb', line 47 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
24 25 26 27 28 29 |
# File 'lib/foursquare2/specials.rb', line 24 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
8 9 10 11 12 13 |
# File 'lib/foursquare2/specials.rb', line 8 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 |