gowalla-ruby

Gowalla API wrapper for Ruby. Not yet intended for production use, thought it is functional and more tests are always being added.

Install

gem install gowalla-ruby config.gem 'gowalla-ruby', :lib => 'gowalla' # in environment.rb

or

./script/plugin install [email protected]:webandy/gowalla-ruby.git

Usage

user = Gowalla::User.find('andyatkinson')
user.stamps
spot = Gowalla::Spot.find(23534)
spot.checkins_count
spot.creator                        # returns a Gowalla::User
spot.top_10
spot.top_10.first.user              # returns a Gowalla::User
spot.events.activity                # see all checkins
spot.events.activity.first.user     # see the user from a checkin


Some real world usages
---
Gowalla::User.find('andyatkinson').stamps_count # => 80
Gowalla::User.find('andyatkinson').last_checkins.first.spot.name => "Tea Garden"
"http://gowalla.com" + Gowalla::User.find('andyatkinson').last_checkins.first.spot.url # url to Tea Garden on Gowalla.com

Testing

Tests use fixture files of API responses as JSON data. API responses are stubbed with Mocha. Tests use the Shoulda framework.

Copyright (c) 2009 Andy Atkinson. See LICENSE for details.

Thanks

Thanks to John Nunemaker for the HTTParty gem. Much of the code for this gem was based on the foursquare gem by Brandon Keene.