Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zbone3/icowatchlist
A simple Node.js API wrapper for icowatchlist.com
https://github.com/zbone3/icowatchlist
api cryptocurrency ico icowatchlist nodejs
Last synced: 26 days ago
JSON representation
A simple Node.js API wrapper for icowatchlist.com
- Host: GitHub
- URL: https://github.com/zbone3/icowatchlist
- Owner: zbone3
- License: mit
- Created: 2018-02-13T15:20:32.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-04T11:48:36.000Z (over 2 years ago)
- Last Synced: 2024-10-07T01:18:26.989Z (30 days ago)
- Topics: api, cryptocurrency, ico, icowatchlist, nodejs
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# icowatchlist
A simple Node.js API wrapper for icowatchlist.com## Installation
`npm install icowatchlist`## Usage
### Initializing
```js
const ICOWatchlist = require('icowatchlist');```
### API Examples
The wrapper returns a promise for all request types, so you can use `Promise.then()` or `async/await` to get the results
```js
// Get all ICOs
ICOWatchlist.getAll();// Get Live ICOs only
ICOWatchlist.getLive();// Get Upcoming ICOs only
ICOWatchlist.getUpcoming();// Get Finished ICOs only
ICOWatchlist.getFinished();// Use with Promise.then()
ICOWatchlist.getLive().then(function(response) {
// print name of first Live ICO
console.log(response[0].name);
});// Use with async function
(async function() {
let allICOs = await ICOWatchlist.getAll();
// Print array of the upcoming ICOs
console.log(allICOs.upcoming);
})();```
### API Reference
This table maps the original API to the wrapper functions and their results.| Original API | Wrapper | Result |
|---------------------|------------------------------|------------------------|
| /public/v1/ | ICOWatchlist.getAll | Object: {"live": [...], "upcoming": [...], "finished": [...]} |
| /public/v1/live | ICOWatchlist.getLive | Array |
| /public/v1/upcoming | ICOWatchlist.getUpcoming | Array |
| /public/v1/finished | ICOWatchlist.getFinished| Array| |