Code Monkey home page Code Monkey logo

foursquare_venues's Introduction

foursquare_venues

A Foursquare Venues API wrapper based off of Quimby.

foursquare_venues removes all dependency on user authentication from Quimby and focuses solely on the Venues API.

Documentation good bits extracted from Quimby:

Installation

Install it as a gem (in your Gemfile) and its dependencies:

gem "json"
gem "typhoeus"
gem "foursquare_venues"

Setup

First, you need to register your application.

Then, get a foursquare_venues with your client_id and client_secret:

foursquare_venues = FoursquareVenues::Venues.new("CLIENT_ID", "CLIENT_SECRET")

Usage

To find a venue directly:

foursquare_venues.find("VENUE_ID")

You can also search venues:

foursquare_venues.search(:ll => "40.7236307,-73.9999479") # Returns all resulting groups
foursquare_venues.nearby(:ll => "40.7236307,-73.9999479") # Returns only nearby venues
foursquare_venues.trending(:ll => "40.7236307,-73.9999479") # Returns only trending venues
foursquare_venues.favorites(:ll => "40.7236307,-73.9999479") # Returns only favorite venues

The :ll option is required for venue searches. You can also feel free to pass any of the other available Foursquare API options, as specified in the docs.

Logging

If you want to see what's going on up in there, you can set Foursquare.verbose to true

Foursquare.verbose = true

Right now it'll log to STDOUT. If you want to use your own logger, you can do something like this:

Foursquare.verbose = true
def Foursquare.log(message)
  Rails.logger.info("[foursquare] #{message}")
end

foursquare_venues's People

Contributors

trestrantham avatar

Stargazers

Ben Eckerson avatar Matt Hisamoto avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

matthisamoto

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.