Skip to content

xxgicoxx/fourplaces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fourplaces

Foursquare Places API V2 wrapper for Node.js.

Features

  • Foursquare Places API V2 endpoints

Docs

Prerequisites

Installation

npm install fourplaces

Credentials

1. Foursquare

# Account
Create an Foursquare account on https://foursquare.com/developers/signup.

# Create App
Create A New Foursquare App on https://pt.foursquare.com/developers/apps.

# Client ID and Secret
Obtain an Client ID and Secret on https://pt.foursquare.com/developers/apps.

Examples

const Fourplaces = require('fourplaces');

const fourplaces = new Fourplaces({
    client_id: 'CLIENT_ID',
    client_secret: 'CLIENT_SECRET',
    redirect_uri: 'REDIRECT_URI',
    locale: 'LOCALE',
    version: 'VERSION'
});

(async () => {
  try {
    const venues = await fourplaces.venues().explore({
      query: 'Café',
      near: 'Pato Branco, PR',
    });

    console.log(venues);
  } catch (error) {
    console.error(error);
  }
})();

Built With

Authors

Acknowledgments