-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(package): Add tonicdev.com example file
- Loading branch information
1 parent
0ec6a43
commit f7b0825
Showing
2 changed files
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
}, | ||
"author": "Contentful <[email protected]>", | ||
"license": "MIT", | ||
"tonicExampleFilename": "tonic-example.js", | ||
"scripts": { | ||
"clean": "rimraf dist && rimraf browser-dist && rimraf coverage && rimraf out", | ||
"build": "npm run clean && npm run vendor && npm run build:dist && npm run build:standalone", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var contentful = require('contentful') | ||
var client = contentful.createClient({ | ||
// This is the space ID. A space is like a project folder in Contentful terms | ||
space: 'developer_bookshelf', | ||
// This is the access token for this space. Normally you get both ID and the token in the Contentful web app | ||
accessToken: '0b7f6x59a0' | ||
}) | ||
// This API call will request an entry with the specified ID from the space defined at the top, using a space-specific access token. | ||
await client.getEntry('5PeGS2SoZGSa4GuiQsigQu') |