sml-openapi-sdk
v1.0.2
Published
The openapi websdk of smartlink
Downloads
107
Readme
sml-openapi-sdk
安装
npm insatll sml-openapi-sdk
import smlOpenAPI from 'sml-openapi-sdk';
const openApi = new smlOpenAPI({
gameid: "xxx", // 必填
apikey: "xxx", // 必填
language:"xxx", // 可选
env:"XXX", // 可选
});
const getSubscribeState = await openApi.getSubscribeState('email');
const getFormInfo = await api.getFormInfo({
source: 'xxx',
language: 'xxx',
});
const getSubscribeFormInfo = await openApi.getSubscribeFormInfo({
email:'xxx',// 必填
language:'xxx',
});
const setSubscribe = await openApi.setSubscribe({
email:'xxx', // 必填
language:'xxx',
attributes: {
platform: "xxx",
},
tags: ["xxx", "xxx"],
location: "xxx",
preferences: ["xxx", "xxx"],
});