Module: Foursquare2::Settings
- Included in:
- Client
- Defined in:
- lib/foursquare2/settings.rb
Instance Method Summary collapse
-
#setting(setting, options = {}) ⇒ Object
Retrieve a single setting for the authenticated user.
-
#settings(options = {}) ⇒ Object
Retrive all settings for the authenticated user.
-
#update_setting(setting, value, options = {}) ⇒ Object
Update a single setting for the authenticated user.
Instance Method Details
#setting(setting, options = {}) ⇒ Object
Retrieve a single setting for the authenticated user.
17 18 19 20 21 22 |
# File 'lib/foursquare2/settings.rb', line 17 def setting(setting, ={}) response = connection.get do |req| req.url "settings/setting", end return_error_or_body(response, response.body.response) end |
#settings(options = {}) ⇒ Object
Retrive all settings for the authenticated user.
6 7 8 9 10 11 |
# File 'lib/foursquare2/settings.rb', line 6 def settings(={}) response = connection.get do |req| req.url "settings/all", end return_error_or_body(response, response.body.response.settings) end |
#update_setting(setting, value, options = {}) ⇒ Object
Update a single setting for the authenticated user.
29 30 31 32 33 34 |
# File 'lib/foursquare2/settings.rb', line 29 def update_setting(setting, value, ={}) response = connection.post do |req| req.url "settings/#{setting}/set", {:value => value}.merge() end return_error_or_body(response, response.body.response) end |