用于 foursquare v2 API 的 Ruby 封装
Ruby wrapper for the foursquare v2 API.
sudo gem install foursquare2Currently this gem does not handle the oauth2 authentication flow for you, use the oauth2 gem to retrieve and store oauth tokens for a user. Obtain your client key/secret for userless access at the foursquare developer site.
client = Foursquare2::Client.new(:client_id => 'your_client_id', :client_secret => 'your_secret')client = Foursquare2::Client.new(:oauth_token => 'user_oauth_token')client = Foursquare2::Client.new(:api_version => '20120505')See the documentation for a list of all supported methods and available options.
client.user(108914)client.venue(5104)client.search_venues(:ll => '36.142064,-86.816086', :query => 'Starbucks')client.add_checkin(:venueId => "4b2afcaaf964a5205bb324e3", :broadcast => 'public', :ll => '36.142064,-86.816086', :shout => 'zomg coffee!1!') client.search_users_by_tip(:ll => '36.142064,-86.816086', :name => 'Marco') client.user_tips("123456", :query => 'coffee') client.search_venues_by_tip(:ll => '36.142064,-86.816086', :query => 'coffee') client.venue_tips("4b2afcaaf964a5205bb324e3", :query => 'coffee')See the documentation or foursquare's endpoint list for parameters.
client.checkin
client.recent_checkins
client.add_checkin
client.add_checkin_comment
client.add_checkin_post
client.add_checkin_reply
client.delete_checkin_comment
client.photo
client.add_photo
client.settings
client.setting
client.update_setting
client.special
client.search_specials
client.tip
client.search_tips
client.add_tip
client.mark_tip_todo
client.mark_tip_done
client.unmark_tip
client.user
client.search_users
client.user_requests
client.user_badges
client.user_checkins
client.user_friends
client.user_photos
client.user_tips
client.user_mayorships
client.user_todos
client.user_venue_history
client.user_friend_request
client.user_unfriend
client.user_approve_friend
client.user_deny_friend
client.user_set_friend_pings
client.venue
client.venue_tips
client.venue_links
client.venue_photos
client.page
client.search_pages
client.herenow
client.page_venues
client.managed_pages
client.search_venues
client.search_venues_by_tip
client.venue_categories
client.trending_venues
client.add_venue
client.mark_venue_todo
client.flag_venue
client.propose_venue_edit
client.edit_venue
client.managed_venues
client.managed_venue_stats
client.venues_timeseries
client.add_special
client.add_campaignCopyright (c) 2011 Matt Mueller. See LICENSE.txt for further details.
暂无开放 Issues,或尚未同步最近议题。