Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created May 20, 2015 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/b9908c65a6f5ffb870a1 to your computer and use it in GitHub Desktop.
Save tmcw/b9908c65a6f5ffb870a1 to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
var got = require('got'),
argv = require('minimist')(process.argv.slice(2));
var API = 'https://www.mapbox.com/core/api/Markers/';
if (!process.env.MapboxAccessToken) throw new Error('MapboxAccessToken env variable required');
if (!argv._.length) throw new Error('mapid argument required');
got(API + argv._[0] + '?access_token=' + process.env.MapboxAccessToken)
.pipe(process.stdout);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment