Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

foursquare-api is a Ruby wrapper for the new Foursqauare V2 API

branch: master
README.rdoc

foursquare-api

foursquare-api is a Ruby wrapper for the new Foursqauare V2 API

installation

$ gem install foursquare-api

usage

venue = Foursquare::Venue.new(access_token)

venue.search({:ll => “37.792694,-122.409325”})

{“meta”=>{“code”=>200},

"response"=>{"groups" =>  [{   "type"=>"trending",
                               "name"=>"Trending Now",
                               "items"=>[{ "id"=>"4330a280f964a520fa271fe3",
                                           "name"=>"Supperclub",
                                           "contact"=>{"phone"=>"4153480900"},
                                           "location"=>{"address"=>"657 Harrison St",
                                           "crossStreet"=>"btw 2nd & 3rd St",
                                           "city"=>"San Francisco",
                                           "state"=>"CA",
                                           "postalCode"=>"94107",
                                           "country"=>"USA",
                                           "lat"=>37.783223,
                                           "lng"=>-122.396472,
                                           "distance"=>1545},
                                           "categories"=>[{"id"=>"4bf58dd8d48988d121941735",
                                                           "name"=>"Lounge",
                                                           "icon"=>"http://foursquare.com/img/categories/nightlife/lounge.png",
                                                           "parents"=>["Nightlife"],
                                                           "primary"=>true}],
                                           "verified"=>false,
                                           "stats"=>{"checkinsCount"=>1306, "usersCount"=>950},
                                           "todos"=>{"count"=>0},
                                           "specials"=>[],
                                           "hereNow"=>{"count"=>5}}]}}

supported endpoints

Checkins

  • add

  • recent

  • addcomment

  • deletecomment

Photo (Beta)

  • add

Setting

  • all

  • set

Tips

  • add

  • search

  • marktodo

  • markdone

  • unmark

User

  • search

  • request

  • badges

  • checkins

  • friends

  • tips

  • todos

  • venuehistory

  • request

  • unfriend

  • approve

  • deny

  • setpings

Venue

  • add

  • categories

  • search

  • herenow

  • tips

  • marktodo

  • flag

  • proposeedit

Contributing to foursquare-api

  • If you have made any improvements to the foursquare-api gem and want to release it under this branch, feel free to contact me on github. I'll add you as a contributor.

  • Otherwise, feel free to fork this branch. Just remember to include me in the README.

Copyright

Copyright © 2011 Ronald Wan. See LICENSE.txt for further details.

Something went wrong with that request. Please try again.