πŸ“œπŸ“ Script to check in to a Foursquare (Swarm) location when user is within range. Uses CoreLocation. Only for macOS.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
config.sample.json
index.js
package.json
yarn.lock

README.md

Nobita

Artwork by renirevenge

A simple script to check in to a (configurable) Foursquare (Swarm) location when user is within range. It detects user location with WhereAmI that uses OSX CoreLocation framework. Optionally run this with launchd to automatically check in at specific times πŸ˜‰

NOTE: This runs only on macOS.

Steps

  1. yarn to setup all dependencies and download whereami.
  2. Copy config.sample.json to config.json and configure:
  • access_token: OAuth access token from Foursquare
  • venue: ID, coordinates, and radius (metres, optional, default 10) of venue
  • venues: Object containing name:venue pair (same structure as venue)
  1. Schedule run script with launchd or LaunchControl.
  • (optional) first argument is the venue key to select from venues in config.json
  • If no argument is supplied it will use venue

To get the access token, follow instructions on this page: https://developer.foursquare.com/overview/auth

To get the venue ID and coordinates, inspect the XHR autocomplete API call on https://foursquare.com/