shopifymo
- Module get product information, customer, order history.
- Get customer information by token and authenticate through email login, password
How to use?
import module in typescript
import ShopifyMo from 'shopifymo'
let shopifyMo = new ShopifyMo({
domain: 'storename.myshopify.com',
apiKey: 'xxx',
apiSecretKey: 'xxx',
adminApiAccessToken: 'xxx',
storefrontAccessToken: 'xxx',
scopes: ['read_products'],
hostName: 'localhost:3000',
apiVersion: LATEST_API_VERSION,
isEmbeddedApp: true
})
let customer = await shopifyMo.adminRestApi.findCustomer(6941610115353)
let ordersHistory: any = await shopifyMo.adminRestApi.findOrderOnCustomer (6941610115353, 'any');
let productAll = await shopifyMo.storefrontApi.getProductAll()
let product = await shopifyMo.storefrontApi.getProduct(8214622208281)
let customerAccessToken: any = await shopifyMo.storefrontApi.customerAccessTokenCreate({
email: 'xxx@gmail.com',
password: '123456'
})
let customer = await shopifyMo.storefrontApi.getCustomer( { customerAccessToken } )