Socket
Socket
Sign inDemoInstall

4sq

Package Overview
Dependencies
47
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    4sq

A wrapper for the Foursquare API


Version published
Maintainers
1
Install size
3.79 MB
Created

Readme

Source

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

Keywords

FAQs

Last updated on 03 Apr 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc