Sha256: 8cd1fa2e65e5d3d909de4dcd1243d8d30440b154d9e30d595b6b7d1d7cb5d290
Contents?: true
Size: 1.13 KB
Versions: 3
Compression:
Stored size: 1.13 KB
Contents
module Foursquare2 module Settings # Retrive all settings for the authenticated user. def settings(options={}) response = connection.get do |req| req.url "settings/all", options end return_error_or_body(response, response.body.response.settings) end # Retrieve a single setting for the authenticated user. # # @param [String] setting - The name of the setting to retrieve, one of sendtotwitter, sendtofacebook, pings. def setting(setting, options={}) response = connection.get do |req| req.url "settings/setting", options end return_error_or_body(response, response.body.response) end # Update a single setting for the authenticated user. # # @param [String] setting - The name of the setting to update, one of sendtotwitter, sendtofacebook, pings. # @param [String] value - One of '1','0' def update_setting(setting, value, options={}) response = connection.post do |req| req.url "settings/#{setting}/set", {:value => value}.merge(options) end return_error_or_body(response, response.body.response) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
foursquare2-2.0.2 | lib/foursquare2/settings.rb |
foursquare2-2.0.1 | lib/foursquare2/settings.rb |
foursquare2-2.0.0 | lib/foursquare2/settings.rb |