chore(docs): Generated API Reference (#4857)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d04b9635f9
commit
7aaa332a32
@@ -1,7 +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.admin.variants.list()
|
||||
.then(({ variants, limit, offset, count }) => {
|
||||
console.log(variants.length)
|
||||
medusa.admin.variants.getInventory(variantId)
|
||||
.then(({ variant }) => {
|
||||
console.log(variant.inventory, variant.sales_channel_availability)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user