airreps-api v2.1.0
AirReps API Wrapper
Simple package for nodejs which helps to communicate with the AirReps API.
Example
const Api = require("airreps-api");
const api = new Api();
api.members()
.then(m => {console.log(m)});
api.chipdoc("AB1562A")
.then(m => {console.log(m)});Functions
chipdoc()
This function gets data from the /chipdoc in the api, and returns it in json format.
The function works in async.
Information
» Required parameters:chipset
» Function example:
api.chipdoc("CHIPSET_HERE");» Returns:
{
link: 'https://airreps.info/files/datasheets/AB1561_AB1562_Datasheet.pdf',
status: 'success'
}members()
This function let's you use the /members endpoint in the api easily. You get all data returned in easy to use JSON.
The function works in async.
Information
» Required parameters:
none
» Function example:
api.members();» Returns:
{ count: 7063, status: 'success', server: 'AirReps', online: 487 }readme()
This function returns a link to the API README.md
The function does not work in async.
Information
» Required parameters:
none
» Function example:
api.readme();» Returns:
"https://github.com/AirReps/airreps_api"stats()
This function let's you use the /stats endpoint in the api easily. You get all data returned in easy to use JSON.
The function works in async.
Information
» Required parameters:
none
» Function example:
api.stats();» Returns:
{ "cpu_usage": "0.1526336584249918%", "memory_usage": 46030848, "version": 1.2 } endpoint()
This function let's you use the /stats/endpoint endpoint in the api easily. You get all data returned in easy to use JSON.
The function works in async.
Information
» Required parameters:
endpoint
» Function example:
api.endpoint('members');» Returns:
{ "usages": 22 }