Skip to content

Foursquare API experiment, to get interesting places to visit near to a given location.

Notifications You must be signed in to change notification settings

4foot30/foursquare-hunting

Repository files navigation

Foursquare hunting

Foursquare API experiment, to get interesting places to visit near to a given location.

Takes a placename string or address that you specify and calls the Google Geocoding API to turn that place into a latitude and longitude.

Those coordinates are then fed to the Foursquare API, which returns recommended venues within about a mile of that point.

Set-up

  • Clone this repository
  • Install Node and NPM, v8.11.3 and v6.2.0 respectively. Specific versions shouldn't matter too much though
  • Run npm install in your terminal, from the project root, to install the project's dependencies
  • Create an app with the Foursquare API
  • Paste the Client ID and Client Secret you get from that into config.js
  • Get a key for the Google Geocoding API and again, paste that into config.js
  • Run gulp in your terminal to compile the project's assets and watch for changes
  • Run node foursquare.js in another terminal tab (or use Nodemon to watch for changes if you're developing)
  • Open your browser and go to localhost:9999

Screenshot

Tech

  • This is a publish/subscribe Node app using Express.js and Faye.js
  • Bootstrap's CSS is included for basic form styling and layout
  • Sass is used, then compiled and minified down to CSS using Gulp
  • Some ES6 JavaScript is used. It's transpiled down for older browsers using Babel

Things to do

  • At the moment, the API only shows the first 30 results. Add UI and API-call pagination, so the user can sequentially load all the results
  • Place look-up can return more than one option. Give the user a way to see these options, and choose between them
  • More robust error handling. Errors are logged, but there isn't much other feedback
  • Remove Bootstrap's CSS and write simple "vanilla" CSS to achieve this layout
  • Do something more interesting with the results, right now they're only showing a venue's name and photo. Plotting them on a map might be nice...

About

Foursquare API experiment, to get interesting places to visit near to a given location.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published