Skip to content

Instantly share code, notes, and snippets.

@masutaka
Last active December 26, 2015 21:39
Show Gist options
  • Save masutaka/7217576 to your computer and use it in GitHub Desktop.
Save masutaka/7217576 to your computer and use it in GitHub Desktop.
a sample of getting my Foursquare checkin histories
require 'foursquare2'
client = Foursquare2::Client.new(:oauth_token => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
client.user_checkins({'offset' => 0, 'limit' => 30})[:items].each do |checkin|
name = checkin[:venue][:name]
lng = checkin[:venue][:location][:lng]
lat = checkin[:venue][:location][:lat]
printf "%s %f %f\n", name, lng, lat
end
@masutaka
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment