module FoursquareNext::Settings

Public Instance Methods

setting(setting, options={}) click to toggle source

Retrieve a single setting for the authenticated user.

@param [String] setting - The name of the setting to retrieve, one of sendtotwitter, sendtofacebook, pings.

# File lib/foursquare_next/settings.rb, line 16
def setting(setting, options={})
  response = connection.get do |req|
    req.url "settings/setting", options
  end
  return_error_or_body(response, response.body.response)
end
settings(options={}) click to toggle source

Retrive all settings for the authenticated user.

# File lib/foursquare_next/settings.rb, line 5
def settings(options={})
  response = connection.get do |req|
    req.url "settings/all", options
  end
  return_error_or_body(response, response.body.response.settings)
end
update_setting(setting, value, options={}) click to toggle source

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'

# File lib/foursquare_next/settings.rb, line 28
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