Module: Foursquare

Defined in:
lib/foursquare.rb,
lib/foursquare/tip.rb,
lib/foursquare/base.rb,
lib/foursquare/user.rb,
lib/foursquare/photo.rb,
lib/foursquare/venue.rb,
lib/foursquare/checkin.rb,
lib/foursquare/settings.rb,
lib/foursquare/user_proxy.rb,
lib/foursquare/venue_proxy.rb,
lib/foursquare/checkin_proxy.rb

Defined Under Namespace

Classes: Base, Checkin, CheckinProxy, Error, Photo, Settings, Tip, User, UserProxy, Venue, VenueProxy

Constant Summary collapse

ERRORS =
{
  "invalid_auth" => "OAuth token was not provided or was invalid.",
  "param_error" => "A required parameter was missing or a parameter was malformed. This is also used if the resource ID in the path is incorrect.",
  "endpoint_error" => "The requested path does not exist.",
  "not_authorized" => "Although authentication succeeded, the acting user is not allowed to see this information due to privacy restrictions.",
  "rate_limit_exceeded" => "Rate limit for this hour exceeded.",
  "deprecated" => "Something about this request is using deprecated functionality, or the response format may be about to change.",
  "server_error" => "Server is currently experiencing issues. Check status.foursquare.com for udpates.",
  "other" => "Some other type of error occurred."
}

Class Method Summary collapse

Class Method Details

.log(msg) ⇒ Object



29
30
31
32
# File 'lib/foursquare.rb', line 29

def self.log(msg)
  return unless verbose?
  puts "[foursquare] #{msg}"
end

.verbose=(setting) ⇒ Object



21
22
23
# File 'lib/foursquare.rb', line 21

def self.verbose=(setting)
  @verbose = setting
end

.verbose?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/foursquare.rb', line 25

def self.verbose?
  @verbose
end