Skip to content

Instantly share code, notes, and snippets.

@dance2die
Created July 8, 2017 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dance2die/52b8031861bd358f7cb30e20b85b6a33 to your computer and use it in GitHub Desktop.
Save dance2die/52b8031861bd358f7cb30e20b85b6a33 to your computer and use it in GitHub Desktop.
Importing apiKeys.js and using it in other JavaScript file
import apiConfig from '../../apikeys';
...
getShelfBooksURL() {
// https://www.goodreads.com/api/index#reviews.list
let goodReadsURL = ` https://www.goodreads.com/review/list`;
let q = `v=2&key=${apiConfig.goodreadsKey}&id=${apiConfig.goodreadsUserID}&shelf=read&sort=date_started`;
return {goodReadsURL, q};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment