Skip to content

Instantly share code, notes, and snippets.

@vicendominguez
Last active August 29, 2015 14:19
Show Gist options
  • Save vicendominguez/c1ab1c64ec1bdded17a9 to your computer and use it in GitHub Desktop.
Save vicendominguez/c1ab1c64ec1bdded17a9 to your computer and use it in GitHub Desktop.
Show full info from Linode API: lists of distributions, datacenters and plans . (nodejs)
#!/usr/bin/env node
// sudo npm install linode-api -g
// Show distribution list & datacenter list & linode plans
var my_api_key = '---KEY-HERE-----';
var client = new(require('linode-api').LinodeClient)(my_api_key);
client.call('avail.distributions', {}, function (err, res) {
if (err) throw err;
console.log(res);
});
client.call('avail.datacenters', {}, function (err, res) {
if (err) throw err;
console.log(res);
});
client.call('avail.linodeplans', {}, function (err, res) {
if (err) throw err;
console.log(res);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment