You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-2Lines changed: 28 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -70,14 +70,38 @@ Don't forget to also get your Space ID.
70
70
71
71
For more information, check the Contentful's REST API reference on [Authentication](https://www.contentful.com/developers/docs/references/authentication/).
72
72
73
+
## Your first request
74
+
75
+
The following code snippet is the most basic one you can use to get some content from Contentful with this SDK:
76
+
77
+
```js
78
+
var contentful =require('contentful')
79
+
var client =contentful.createClient({
80
+
// This is the space ID. A space is like a project folder in Contentful terms
81
+
space:'developer_bookshelf',
82
+
// This is the access token for this space. Normally you get both ID and the token in the Contentful web app
83
+
accessToken:'0b7f6x59a0'
84
+
})
85
+
// This API call will request an entry with the specified ID from the space defined at the top, using a space-specific access token.
86
+
client.getEntry('5PeGS2SoZGSa4GuiQsigQu')
87
+
.then((entry) =>console.log(entry))
88
+
```
89
+
90
+
You can try and change the above example at [Tonic](https://tonicdev.com/npm/contentful), or if you'd prefer a more Browser oriented example, check out this [JSFiddle](https://jsfiddle.net/contentful/kefaj4s8/) version of our Product Catalogue demo app.
91
+
73
92
## Documentation/References
74
93
94
+
In order to do more with this SDK, have a look at the various documentation links below:
* From version 3.0.0 onwards, you can access documentation for a specific version by visiting `https://contentful.github.io/contentful.js/contentful/<VERSION>`
77
-
* For versions prior to 3.0.0, you can access documentation at [https://github.com/contentful/contentful.js/tree/legacy](https://github.com/contentful/contentful.js/tree/legacy)
78
98
* Check the [Contentful for JavaScript](https://www.contentful.com/developers/docs/javascript/) page for Tutorials, Demo Apps, and more information on other ways of using JavaScript with Contentful
79
99
*[Contentful's CDA REST API reference](https://www.contentful.com/developers/docs/references/content-delivery-api/) for additional details on the Delivery API
80
100
101
+
### Legacy contentful.js
102
+
103
+
For versions prior to 3.0.0, you can access documentation at [https://github.com/contentful/contentful.js/tree/legacy](https://github.com/contentful/contentful.js/tree/legacy)
104
+
81
105
## Versioning
82
106
83
107
This project strictly follows [Semantic Versioning](http://semver.org/) by use of [semantic-release](https://github.com/semantic-release/semantic-release).
@@ -94,7 +118,9 @@ See the [migration guide](migration_from_2_x.md) for more information.
94
118
95
119
## Support
96
120
97
-
Please open an [issue](https://github.com/contentful/contentful.js/issues/new)
121
+
If you have a problem with this library, please file an [issue](https://github.com/contentful/contentful.js/issues/new) here on Github.
122
+
123
+
If you have other problems with Contentful not related to this library, you can contact [Customer Support](https://support.contentful.com).
0 commit comments