@easy-front-core-sdk/xhs
v1.5.5
Published
核心模块-小红书开放平台
Downloads
4
Readme
xhs
小红书开放平台 SDK
Usage
初始化
import { XhsCoreFactory } from '@easy-front-core-sdk/xhs';
const xhsCore = XhsCoreFactory.putCore({
appKey: 'YOUR_APP_KEY',
appSecret: 'YOUR_APP_SECRET',
});
if (xhsCore) {
console.log(`xhssdk 初始化成功`);
} else {
console.log(`xhssdk 初始化失败`);
}
使用
const xhsCore = XhsCoreFactory.getCore('YOUR_APP_KEY');
// 获取订单列表
const package_list = xhsCore.request(
ApiMethod.PACKAGE__GET_PACKAGE_LIST,
{
startTime: 1675735730,
endTime: 1675735748,
timeType: 2,
pageNo: 1,
pageSize: 100,
},
'ACCESS_TOKEN'
);