
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@flowaccount/lazada-open-platform-sdk
Advanced tools
fork of https://github.com/branch8/lazada-open-platform-sdk
| ! WIP project
Install sdk
[~/project/dir] $ npm install lazada-open-platform-sdk
Require LazadaAPI
class
import LazadaAPI from 'lazada-open-platform-sdk'
// OR
const LazadaAPI = require('lazada-open-platform-sdk')
Instantiate a LazadaAPI Object
/**
* LazadaAPI class constructor
* @param {string} appKey
* @param {string} appSecret
* @param {Venture} countryCode @ref: 'src/LazadaClient/constants.js'
* countryCode should be one of the following
* | 'SINGAPORE'
* | 'THAILAND'
* | 'MALAYSIA'
* | 'VIETNAM'
* | 'PHILIPPINES'
* | 'INDONESIA'
* @param {string?} accessToken require for some API
*/
const aLazadaAPI = new LazadaAPI(appKey, appSecret, 'SINGAPORE')
// OR
const accessToken = 'some_access_token'
const aLazadaAPIWithToken = new LazadaAPI(appKey, appSecret, 'SINGAPORE', accessToken)
Call API action with proper parameters
// all API action return promise
aLazadaAPI
.generateAccessToken({ code: 'auth_code' })
.then(response => {
const { access_token } = response // JSON data from Lazada's API
})
// for API action that require authorization, you must set the accessToken first
aLazadaAPI.accessToken = 'some_access_token'
aLazadaAPI
.getShipmentProviders()
.then(response => {
// JSON data from Lazada's API
})
For available API actions, check the support table. For proper API request parameters, check Lazada's offcial documentation and source code located in src/LazadaClient/<namespace>
Order | status |
---|---|
getDocument | :heavy_check_mark: |
getFailureReasons | :heavy_check_mark: |
getMultipleOrderItems | :heavy_check_mark: |
getOrder | :heavy_check_mark: |
getOrderItems | :heavy_check_mark: |
getOrders | :heavy_check_mark: |
setInvoiceNumber | :heavy_check_mark: |
setStatusToCanceled | :heavy_check_mark: |
setStatusToPackedByMarketplace | :heavy_check_mark: |
setStatusToReadyToShip | :heavy_check_mark: |
Product | status |
---|---|
createProduct | :heavy_check_mark: |
getBrands | :heavy_check_mark: |
getCategoryAttributes | :heavy_check_mark: |
getCategoryTree | :heavy_check_mark: |
getProducts | :heavy_check_mark: |
getQcStatus | :no_entry_sign: |
getResponse | :no_entry_sign: |
migrateImage | :heavy_check_mark: |
migrateImages | :no_entry_sign: |
removeProduct | :heavy_check_mark: |
setImages | :heavy_check_mark: |
updatePriceQuantity | :heavy_check_mark: |
updateProduct | :heavy_check_mark: |
uploadImage | :no_entry_sign: |
Finance | status |
---|---|
getPayoutStatus | :no_entry_sign: |
getTransactionDetails | :no_entry_sign: |
Logistics | status |
---|---|
getShipmentProviders | :heavy_check_mark: |
Seller | status |
---|---|
getSeller | :no_entry_sign: |
updateSeller | :no_entry_sign: |
updateUser | :no_entry_sign: |
System | status |
---|---|
generateAccessToken | :heavy_check_mark: |
refreshAccessToken | :heavy_check_mark: |
DataMoat | status |
---|---|
dataMoatBatchLog | :no_entry_sign: |
dataMoatComputeRisk | :no_entry_sign: |
dataMoatLogin | :no_entry_sign: |
dataMoatOrder | :no_entry_sign: |
camelCase
snake_case
or PascalCase
src/
├── LazadaAPI // LazadaAPI: top level controller class
│ └── index.js
├── LazadaClient // LazadaClient: namespace seperated API actions
│ ├── index.js
│ ├── logistics.js
│ ├── order.js
│ ├── product.js
│ └── system.js
├── LazadaRequest // LazadaRequest: responsible for network request
│ ├── index.js
│ └── signature // logic for signing API request
│ └── index.js
├── __tests__ // all tests located here
└── index.js // a.k.a. main.c
const APIRequest = {
appKey: ":require",
appSecret: ":require",
baseURL: ":require" // Protocol (default: https) + Gateway (location specific)
HttpAction: "GET OR POST", // API specific
apiPath: "action/path", // API specific
accessToken: ":optional", // API specific
payload: {} // API specific
};
FAQs
fork of https://github.com/branch8/lazada-open-platform-sdk
We found that @flowaccount/lazada-open-platform-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.