Skip to content

Commit 48b356d

Browse files
committed
Read me file documentation changes made
1 parent fe6caf6 commit 48b356d

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

.npmignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ coverage/
1212
mochawesome-report/
1313
.nyc_output/
1414
typings
15-
webpack/
15+
webpack/
16+
tsconfig.json
17+
.jsdoc.json

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@ npm i contentstack-management
2020
```
2121
To import the SDK, use the following command:
2222
```
23-
import contentstack from ‘contentstack-mangement’
23+
import contentstack from ‘@contentstack/contentstack-mangement’
2424
```
25-
To initialize the SDK, you will need to pass ```axios``` instance
25+
To initialize the SDK, you will need to pass ```axios``` instance as follows:
2626
```
2727
import axios from 'axios'
2828
contentstackClient = contentstack.client(axios, {})
2929
```
3030

3131
### Authentication
32-
To use this SDK you need to authenticate using the user Authtoken, credentials, or Management Token (stack-level token).
32+
To use this SDK, you need to authenticate users. You can do this by using the Authtoken, credentials, or Management Token (stack-level token). Let's discuss them in detail.
3333
### Authtoken
34-
An **Authtoken** is a read-write token used to make authorized CMA requests, and it is a **user-specific** token.
34+
An [Authtoken](https://www.contentstack.com/docs/developers/create-tokens/types-of-tokens/#authentication-tokens-authtokens-) is a read-write token used to make authorized CMA requests, and it is a **user-specific** token.
3535
```
3636
import axios from 'axios'
3737
contentstackClient = contentstack.client(axios, { authtoken: 'AUTHTOKEN' })
3838
```
3939
### Login
40-
To Login to Contentstack using credentials:
40+
To log in to Contentstack, provide your credentials in the following code:
4141
```
4242
contentstackClient.login({ email: 'EMAIL', password: 'PASSWORD'})
4343
.then((response) => {
@@ -47,7 +47,7 @@ contentstackClient.login({ email: 'EMAIL', password: 'PASSWORD'})
4747
```
4848

4949
### Management Token
50-
**Management Tokens** are **stack-level** tokens, with no users attached to them.
50+
[Management Tokens](https://www.contentstack.com/docs/developers/create-tokens/about-management-tokens/) are **stack-level** tokens, with no users attached to them.
5151
```
5252
contentstackClient.stack('API_KEY', 'MANAGEMENT_TOKEN')
5353
.fetch()
@@ -57,14 +57,15 @@ contentstackClient.stack('API_KEY', 'MANAGEMENT_TOKEN')
5757
```
5858
### Contentstack Management JavaScript SDK: 5-minute Quickstart
5959
#### Initializing your SDK:
60+
To use the JavaScript CMA SDK, you need to first initialize it. To do this, use the following code:
6061
```
61-
import contentstack from ‘contentstack-mangement’
62+
import contentstack from ‘@contentstack/contentstack-mangement’
6263
import axios from 'axios'
6364
6465
var contentstackClient = contentstack.client(axios, { authtoken: 'AUTHTOKEN' })
6566
```
6667
#### Fetch Stack details
67-
The following code snippet is use to get Stack details from Contentstack using this SDK:
68+
To fetch your stack details through the SDK, use the following lines of code:
6869
```
6970
contentstackClient.stack('API_KEY')
7071
.fetch()
@@ -74,7 +75,7 @@ contentstackClient.stack('API_KEY')
7475
```
7576

7677
#### Create Entry
77-
The following code snippet is use to create Entry of specific Content Type into Stack using this SDK:
78+
You can use the following lines of code to create an entry in a specific content type of a stack through the SDK:
7879
```
7980
var entry = {
8081
title: 'Sample Entry',
@@ -88,7 +89,7 @@ contentstackClient.stack('API_KEY').contentType('CONTENT_TYPE_UID').entry().crea
8889
```
8990

9091
#### Create Asset
91-
The following code snippet is use to create Asset into Stack using this SDK:
92+
Use the following code snippet to upload assets to your stack through the SDK:
9293
```
9394
var asset = {
9495
upload: 'path/to/file',

0 commit comments

Comments
 (0)