module Skittles::Client::Setting

Define methods related to settings. @see developer.foursquare.com/docs/settings/settings.html

Public Instance Methods

all_settings() click to toggle source

Returns all settings of the active user.

@return [Hashie::Mash] A setting object for the acting user. @requires_acting_user Yes @see developer.foursquare.com/docs/settings/all.html

# File lib/skittles/client/setting.rb, line 11
def all_settings
  get('settings/all').settings
end
set_setting(id, value) click to toggle source

Change a setting for the given user.

@param id [String] Name of setting to change, sendToTwitter, sendToFacebook, receivePings, receiveCommentPings. @param value [Integer] 1 for true, and 0 for false. @requires_acting_user Yes @return [Hashie::Mash] A confirmation message. @see developer.foursquare.com/docs/settings/set.html

# File lib/skittles/client/setting.rb, line 22
def set_setting(id, value)
  post("settings/#{id}/set", { :value => value }).settings
end
setting(id) click to toggle source

Returns a setting for the acting user.

@param id [String] The name of a setting. @return [Hashie::Mash] The value for this setting for the acting user. @requires_acting_user Yes @see developer.foursquare.com/docs/settings/settings.html

# File lib/skittles/client/setting.rb, line 32
def setting(id)
  get("settings/#{id}").value
end