crypto-news-api
Advanced tools
Comparing version 1.0.12 to 1.0.13
{ | ||
"name": "crypto-news-api", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "API to get a crypto newsfeed in your app", | ||
@@ -5,0 +5,0 @@ "main": "dist/node/index.node.js", |
@@ -21,6 +21,8 @@ CryptoControl Crypto News API | ||
## Usage | ||
First make sure that you've recieved an API key by visiting [https://cryptocontrol.io/apis](https://cryptocontrol.io/apis). With the API key you can write the following code. | ||
First make sure that you've recieved an API key by visiting [https://cryptocontrol.io/apis](https://cryptocontrol.io/apis). With the API key, you can write the following code. | ||
**NOTE**: API access is rate-limited to 5 req/sec and 10,000 req/hour. If you're interacting with large number of clients, it'll be a good idea to cache your API calls. | ||
### Node.js | ||
### Node.js ES6/Typescript | ||
```javascript | ||
@@ -36,6 +38,16 @@ import CryptoNewsApi from 'crypto-news-api' | ||
### Node.js ES5 | ||
```javascript | ||
var CryptoNewsAPI = require('crypto-news-api').default | ||
const Api = new CryptoNewsAPI('API_KEY_HERE') | ||
Api.getTopNews() | ||
.then(function (articles) { console.log(articles) }) | ||
.catch(function (error) { console.log(error) }) | ||
``` | ||
### Bower/Webpack | ||
```html | ||
<script src="./bower_components/crypto-news-api/dist/bundle.js"></script> | ||
<script> | ||
@@ -42,0 +54,0 @@ const Api = new window.CryptoNewsApi('API_KEY_HERE') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
690197
104