Module: Foursquared::Settings
- Included in:
- Client
- Defined in:
- lib/foursquared/settings.rb
Overview
Settings module
Instance Method Summary collapse
-
#all_settings ⇒ Hash
Returns all settings for the user.
-
#set_setting(setting_id, options = {}) ⇒ Hash
Set the value for a setting.
-
#setting(setting_id) ⇒ Hash
Return the value for the setting with given ID.
Instance Method Details
#all_settings ⇒ Hash
Returns all settings for the user
15 16 17 |
# File 'lib/foursquared/settings.rb', line 15 def all_settings response = get("/settings/all")["response"]["settings"] end |
#set_setting(setting_id, options = {}) ⇒ Hash
Set the value for a setting
24 25 26 |
# File 'lib/foursquared/settings.rb', line 24 def set_setting setting_id, ={} response = post("/settings/#{setting_id}/set",)["response"] end |
#setting(setting_id) ⇒ Hash
Return the value for the setting with given ID
8 9 10 11 |
# File 'lib/foursquared/settings.rb', line 8 def setting setting_id response = get("/settings/#{setting_id}")["response"] response end |