Created
May 20, 2015 22:00
-
-
Save tmcw/b9908c65a6f5ffb870a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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