0.1.1 • Published 9 years ago

nodequery-api v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

nodequery-api

This is a SDK implementation for the nodequery.com service.

Getting Started

Install the module with: npm install nodequery-api

Usage

var NodeQueryAPI = require('nodequery-api')
var nqa = new NodeQueryAPI('YOUR-API-KEY')

nqa.accountStatus(function(error, data){
    // data is the JSON response from remote API
});

nqa.loads('hourly', SERVER-ID, function(error, data){
    // data is the JSON response from remote API
});

Callbacks

Each callback receives two arguments. For a successful request the first argument will be null or undefined and the second argument will be the parsed JSON response from the API.

API

NOdeQUeryAPI.account(callback);

(Coming soon)

NOdeQUeryAPI.listServers(callback);

(Coming soon)

NOdeQUeryAPI.serverDetails(serverID, callback);

(Coming soon)

NOdeQUeryAPI.serverLoads(serverID, callback);

(Coming soon)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

License

Copyright (c) 2015 Johnnie Zhang
Licensed under the MIT license.