chore(docs): Generated API Reference (#2649)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
546577a81a
commit
3cee0bc8fc
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.store.productTypes.list()
|
||||
.then(({ product_types }) => {
|
||||
console.log(product_types.length);
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/product-types' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
Reference in New Issue
Block a user