Module: Foursquare2::Settings
- Included in:
- Client
- Defined in:
- lib/foursquare2/settings.rb
Instance Method Summary collapse
-
#setting(setting) ⇒ Object
Retrieve a single setting for the authenticated user.
-
#settings ⇒ Object
Retrive all settings for the authenticated user.
-
#update_setting(setting, value) ⇒ Object
Update a single setting for the authenticated user.
Instance Method Details
#setting(setting) ⇒ Object
Retrieve a single setting for the authenticated user.
15 16 17 18 |
# File 'lib/foursquare2/settings.rb', line 15 def setting(setting) response = connection.get("settings/setting") return_error_or_body(response, response.body.response) end |
#settings ⇒ Object
Retrive all settings for the authenticated user.
6 7 8 9 |
# File 'lib/foursquare2/settings.rb', line 6 def settings response = connection.get("settings/all") return_error_or_body(response, response.body.response.settings) end |
#update_setting(setting, value) ⇒ Object
Update a single setting for the authenticated user.
25 26 27 28 29 30 |
# File 'lib/foursquare2/settings.rb', line 25 def update_setting(setting,value) response = connection.post do |req| req.url "settings/#{setting}/set", {:value => value} end return_error_or_body(response, response.body.response) end |