Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goenning/nixstats-js
NIXStats.js is CLI and JavaScript Wrapper for NIXStats
https://github.com/goenning/nixstats-js
Last synced: 13 days ago
JSON representation
NIXStats.js is CLI and JavaScript Wrapper for NIXStats
- Host: GitHub
- URL: https://github.com/goenning/nixstats-js
- Owner: goenning
- Created: 2016-06-16T20:27:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-06-28T21:14:16.000Z (over 8 years ago)
- Last Synced: 2024-12-15T03:03:26.936Z (19 days ago)
- Language: JavaScript
- Size: 201 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NIXStats.js is CLI and JavaScript Wrapper for [NIXStats](https://nixstats.com)
## Using as CLI
### Install
Install it with `npm install -g nixstats`.
### Usage
Go to [NIXStats](https://nixstats.com) and generate your own API token.
Run `nixstats config `
Run `nixstats now` to see current servers situation.
![](nixstats.png)
### Help
Run `nixstats --help` for full CLI options.
## Using as a JavaScript Wrapper for NIXStats API
### Install
Install it with `npm install nixstats -save`.
### Usage
```javascript
var ns = require('nixstats');
var nsClient = new ns.NIXStatsClient('<');
nsClient.server.list().then((result) => {
for(var server of result.servers) {
//...
}
});
```### About
1. For full list of `NIXStatsClient` functions see [index.js](lib/index.js);
2. All functions are returned as Promises;
3. The result of each Promise is exactly as shown in the [official documentation](https://nixstats.com/api/documentation.html);## Looking forward
- [CLI] output more useful information;
- [CLI] more operations, history, details, etc;
- [Wrapper] enable the user to choose between Promises or Callback;