-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.js
More file actions
28 lines (17 loc) · 732 Bytes
/
index.js
File metadata and controls
28 lines (17 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var CryptoNewsAPI = require('crypto-news-api').default
const Api = new CryptoNewsAPI(process.env.NEWS_API_KEY)
Api.getTopNews()
// .then(articles => console.log(articles))
.catch(error => console.error(error))
Api.getTopRedditPostsByCoin("bitcoin")
// .then(articles => console.log(articles))
.catch(error => console.error(error))
Api.getLatestTweetsByCoin("bitcoin")
// .then(tweets => console.log(tweets))
.catch(error => console.error(error))
Api.getLatestRedditPostsByCoin("bitcoin")
// .then(redditPosts => console.log(redditPosts))
.catch(error => console.error(error))
Api.getTopFeedByCoin("bitcoin")
// .then(feed => console.log(feed))
.catch(error => console.error(error))