Skip to content

Commit e3a608c

Browse files
committed
chore: restore original readme.md structure
1 parent 4b79214 commit e3a608c

File tree

1 file changed

+27
-44
lines changed

1 file changed

+27
-44
lines changed

README.md

Lines changed: 27 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<p align="center">
1414
<a href="README.md">Readme</a> ·
1515
<a href="SETUP.md">Setup</a> ·
16+
<a href="MIGRATION.md">Migration</a> ·
1617
<a href="CHANGELOG.md">Changelog</a> ·
1718
<a href="CONTRIBUTING.md">Contributing</a>
1819
</p>
@@ -41,47 +42,29 @@
4142

4243
<!-- TOC -->
4344

44-
- [Getting started](#getting-started)
45+
- [Features](#features)
46+
- [Supported Environments](#supported-environments)
47+
- [Getting Started](#getting-started)
4548
- [Installation](#installation)
46-
- [Node:](#node)
47-
- [Browser bundle in script tag:](#browser-bundle-in-script-tag)
48-
- [Typings](#typings)
49+
- [Node](#node)
50+
- [Browser](#browser-bundle-in-script-tag)
51+
- [Typings](#typings)
4952
- [Authentication](#authentication)
5053
- [Using ES6 import](#using-es6-import)
51-
- [Using CommonJS require imports](#using-commonjs-require-imports)
52-
- [Your first request](#your-first-request)
54+
- [Your first Request](#your-first-request)
5355
- [Legacy Client Interface](#legacy-client-interface)
54-
- [App Framework](#app-framework)
55-
- [Troubleshooting](#troubleshooting)
56-
- [Documentation/References](#documentationreferences)
56+
- [App Framework](#app-framework)
57+
- [Troubleshooting](#troubleshooting)
58+
- [Documentation/References](#documentationreferences)
5759
- [Configuration](#configuration)
58-
- [accessToken (required, when `apiAdapter` is not set)](#accesstoken-required-when-apiadapter-is-not-set)
59-
- [host (default: `'api.contentful.com'`)](#host-default-apicontentfulcom)
60-
- [hostUpload (default: `'upload.contentful.com'`)](#hostupload-default-uploadcontentfulcom)
61-
- [basePath (default: \`\`)](#basepath-default-)
62-
- [httpAgent (default: `undefined`)](#httpagent-default-undefined)
63-
- [httpsAgent (default: `undefined`)](#httpsagent-default-undefined)
64-
- [headers (default: `{}`)](#headers-default-)
65-
- [proxy (default: `undefined`)](#proxy-default-undefined)
66-
- [retryOnError (default: `true`)](#retryonerror-default-true)
67-
- [logHandler (default: `function (level, data) {}`)](#loghandler-default-function-level-data-)
68-
- [requestLogger (default: `function (config) {}`)](#requestlogger-default-function-config-)
69-
- [responseLogger (default: `function (response) {}`)](#responselogger-default-function-response-)
70-
- [apiAdapter (default: `new RestAdapter(configuration)`)](#apiadapter-default-new-restadapterconfiguration)
71-
- [throttle (default: `0`)](#throttle-default-0)
72-
- [Reference documentation](#reference-documentation)
73-
- [Contentful JavaScript resources](#contentful-javascript-resources)
74-
- [REST API reference](#rest-api-reference)
75-
- [Versioning](#versioning)
76-
- [Experimental features](#experimental-features)
77-
- [Current experimental features](#current-experimental-features)
78-
- [Reach out to us](#reach-out-to-us)
79-
- [You have questions about how to use this library?](#you-have-questions-about-how-to-use-this-library)
80-
- [You found a bug or want to propose a feature?](#you-found-a-bug-or-want-to-propose-a-feature)
81-
- [You need to share confidential information or have other questions?](#you-need-to-share-confidential-information-or-have-other-questions)
82-
- [Get involved](#get-involved)
83-
- [License](#license)
84-
- [Code of Conduct](#code-of-conduct)
60+
- [Reference Documentation](#reference-documentation)
61+
- [Contentful Javascript resources](#contentful-javascript-resources)
62+
- [REST API reference](#rest-api-reference)
63+
- [Versioning](#versioning)
64+
- [Reach out to us](#reach-out-to-us)
65+
- [Get involved](#get-involved)
66+
- [License](#license)
67+
- [Code of Conduct](#code-of-conduct)
8568

8669
<!-- /TOC -->
8770
</details>
@@ -179,7 +162,7 @@ const client = createClient(
179162
// This is the access token for this space. Normally you get the token in the Contentful web app
180163
accessToken: 'YOUR_ACCESS_TOKEN',
181164
},
182-
{ type: 'plain' }
165+
{ type: 'plain' },
183166
)
184167
//....
185168
```
@@ -190,13 +173,13 @@ You can use the commonjs require with the library as follows
190173

191174
```js
192175
// import createClient directly
193-
const contentful = require('contentful-management');
176+
const contentful = require('contentful-management')
194177
const client = contentful.createClient(
195178
{
196179
// This is the access token for this space. Normally you get the token in the Contentful web app
197180
accessToken: 'YOUR_ACCESS_TOKEN',
198181
},
199-
{ type: 'plain' }
182+
{ type: 'plain' },
200183
)
201184
//....
202185
```
@@ -211,7 +194,7 @@ const plainClient = createClient(
211194
{
212195
accessToken: 'YOUR_ACCESS_TOKEN',
213196
},
214-
{ type: 'plain' }
197+
{ type: 'plain' },
215198
)
216199

217200
const environment = await plainClient.environment.get({
@@ -239,7 +222,7 @@ const scopedPlainClient = createClient(
239222
spaceId: '<space_id>',
240223
environmentId: '<environment_id>',
241224
},
242-
}
225+
},
243226
)
244227

245228
// entries from '<space_id>' & '<environment_id>'
@@ -250,8 +233,8 @@ const entries = await scopedPlainClient.entry.getMany({
250233
},
251234
})
252235
```
253-
254-
You can try and change the above example on [Runkit](https://npm.runkit.com/contentful-management).
236+
237+
You can try and change the above example on [Runkit](https://npm.runkit.com/contentful-management).
255238

256239
The benefits of using the "plain" version of the client, over the legacy version, are:
257240

@@ -313,7 +296,7 @@ contentfulApp.init((sdk) => {
313296
environmentId: sdk.ids.environmentAlias ?? sdk.ids.environment,
314297
spaceId: sdk.ids.space,
315298
},
316-
}
299+
},
317300
)
318301

319302
// ...rest of initialization code

0 commit comments

Comments
 (0)