chore(docs): Generated API Reference (#3021)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2c2c70d88c
commit
853f8efdf3
@@ -1,7 +0,0 @@
|
||||
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.admin.productCategories.list()
|
||||
.then(({ product_category, limit, offset, count }) => {
|
||||
console.log(product_category.length);
|
||||
});
|
||||
@@ -1,9 +0,0 @@
|
||||
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.admin.productCategories.create({
|
||||
name: 'Jeans',
|
||||
})
|
||||
.then(({ productCategory }) => {
|
||||
console.log(productCategory.id);
|
||||
});
|
||||
@@ -1,7 +0,0 @@
|
||||
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.admin.productCategories.delete(product_category_id)
|
||||
.then(({ id, object, deleted }) => {
|
||||
console.log(id);
|
||||
});
|
||||
@@ -1,7 +0,0 @@
|
||||
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.admin.productCategories.retrieve("pcat-id")
|
||||
.then(({ productCategory }) => {
|
||||
console.log(productCategory.id);
|
||||
});
|
||||
Reference in New Issue
Block a user