Skip to content

Commit

Permalink
fix(package): Add tonicdev.com example file
Browse files Browse the repository at this point in the history
  • Loading branch information
trodrigues committed Apr 6, 2016
1 parent 0ec6a43 commit f7b0825
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 9 additions & 0 deletions tonic-example.js
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')

0 comments on commit f7b0825

Please sign in to comment.