4sq
A wrapper for the Foursquare API
Last updated 6 years ago by meritt .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install 4sq 
SYNC missed versions from official npm registry.

4sq

NPM version Dependency Status

A node.js wrapper for the Foursquare API.

Installation

$ npm install 4sq

Examples

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 data

How to retrieve foursquare OAuth2 access_token

Grab latest source code and install all dev dependencies

$ npm link

Change 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.coffee

API

  • 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.

Bitdeli Badge

Current Tags

  • 0.1.6                                ...           latest (6 years ago)

8 Versions

  • 0.1.6                                ...           6 years ago
  • 0.1.5                                ...           6 years ago
  • 0.1.4                                ...           7 years ago
  • 0.1.3                                ...           7 years ago
  • 0.1.2                                ...           7 years ago
  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
  • 0.0.1                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 18
Last Day 0
Last Week 2
Last Month 16
Dependencies (1)
Dev Dependencies (4)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |