chore(docs): Generated API Reference (#3061)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3a0f37ef02
commit
296d6e229f
@@ -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.productCategories.retrieve("pcat-id")
|
||||
.then(({ productCategory }) => {
|
||||
console.log(productCategory.id);
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.store.productTags.list()
|
||||
.then(({ product_tags }) => {
|
||||
console.log(product_tags.length);
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/product-categories' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1,2 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/product-categories/{id}' \
|
||||
--header 'Authorization: Bearer {api_token}'
|
||||
@@ -0,0 +1 @@
|
||||
curl --location --request GET 'https://medusa-url.com/store/product-tags'
|
||||
Reference in New Issue
Block a user