docs: added dividers + see also section (#2899)
This commit is contained in:
@@ -12,6 +12,8 @@ To install the Medusa JS Client run the following command:
|
||||
npm install @medusajs/medusa-js
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Usage
|
||||
|
||||
Import Medusa as a default import and initiate it:
|
||||
@@ -22,6 +24,8 @@ import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa()
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## How to Use this Reference
|
||||
|
||||
You'll find in the sidebar of this reference names of different resources. These resources are properties in the medusa instance you initialize and you can access them directly using the instance. Then, you'll be able to access the methods or nested resources within those resources.
|
||||
@@ -47,6 +51,8 @@ medusa.customers.addresses.addAddress({
|
||||
})
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Authentication
|
||||
|
||||
Authentication can be achieved in two ways using the `medusa-js` client: either by utilizing API keys or by using cookie based authentication. Each method has its own unique use case.
|
||||
@@ -59,6 +65,8 @@ API keys can only be used for admin functionality in Medusa since only users of
|
||||
|
||||
Authentication using cookies is done automatically by Axios when authenticating using the [auth](/references/js-client/classes/AuthResource) endpoints. After authentication, all subsequent calls will be authenticated.
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
### Initialize with config object
|
||||
|
||||
Reference in New Issue
Block a user