1.1.3 • Published 9 years ago

koa-foursquare v1.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

koa-foursquare

Similar to foursquarevenues, except it uses koa-request instead of request to access foursquares venue API.

Installation

Install using npm:

npm install koa-foursquare --save

Example

Basic usage:

'use strict';
var koa        = require('koa');
var config     = require('./config');
var foursquare = require('koa-foursquare')(config.fs.clientID, config.fs.clientSecret);
var app        = koa();

require('koa-qs')(app, 'first');

app.use(function *(next) {
  let ll = (this.query.ll !== undefined) ? this.query : '39.3968238,-74.5447961';
  let params = {
    ll: ll,
    limit: 15,
    venuePhotos: 1,
    categoryId: '4d4b7105d754a06374d81259',
  };
  this.type = 'json';
  this.body = yield foursquare.exploreVenues(params);
});

app.listen(3000);

Methods

getCategories

Returns a hierarchical list of categories applied to venues.

No parameters.

getVenues

Returns a list of venues near the current location, optionally matching a search term.

ParamTypeDescription
paramsObjecturl parameters

Parameter options found here under Parameters section.

exploreVenues

Returns a list of recommended venues near the current location.

ParamTypeDescription
paramsObjecturl parameters

Parameter options found here under Parameters section.

getVenue

Gives details about a venue, including location, mayorship, tags, tips, specials, and category.

ParamTypeDescription
paramsObjecturl parameters

Parameter options found here under Parameters section.

Contributing

Please submit all issues and pull requests to the koa-foursquare repository!

Support

If you have any problem or suggestion please open an issue here.

1.1.3

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago