Skip to content

Instantly share code, notes, and snippets.

@kbrgl
Created July 17, 2019 06:39
Show Gist options
  • Save kbrgl/87b6d3bd2619a90e9028ee1501c1cc62 to your computer and use it in GitHub Desktop.
Save kbrgl/87b6d3bd2619a90e9028ee1501c1cc62 to your computer and use it in GitHub Desktop.
Aylien wrapper
const bluebird = require('bluebird')
const AylienNewsApi = require('aylien-news-api')
const api = new AylienNewsApi.DefaultApi()
bluebird.promisifyAll(api)
// Configure API authorization
const { app_id: appId, app_key: appKey } = api.apiClient.authentications
appId.apiKey = process.env.AYLIEN_APP_ID
appKey.apiKey = process.env.AYLIEN_APP_KEY
module.exports = api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment