0.1.6 • Published 12 years ago
4sq v0.1.6
4sq
A node.js wrapper for the Foursquare API.
Installation
$ npm install 4sqExamples
var Foursquare = require('4sq');
var fsq = new Foursquare({
token: 'OAuth2 access_token'
});
fsq.checkins('self', {limit: 5}, function(error, data) {
if (error) {
throw new Error(error);
}
console.log(data);
});Foursquare = require '4sq'
fsq = new Foursquare token: 'OAuth2 access_token'
fsq.checkins 'self', limit: 5, (error, data) ->
throw new Error error if error
console.log dataHow to retrieve foursquare OAuth2 access_token
Grab latest source code and install all dev dependencies
$ npm linkChange your host, client id, client secret in examples/get-access-token.coffee and after that run examples/get-access-token.coffee
$ coffee examples/get-access-token.coffeeAPI
user(user_id[, params], callback)checkins(user_id[, params], callback)badges(user_id[, params], callback)
By default user_id set to self.
Author
License
The MIT License, see the included license.md file.
