@ epilot/ 目标客户端
页:1
安装
npm install --save @epilot/targeting-client
使用量
import { getClient } from '@epilot/targeting-client';
const targetingClient = getClient();
const result = await targetingClient.changeCampaignStatus({ campaign_id: });
文档
匹配运动和目标
查明该实体是否参与某项运动或运动,例如:
import { getClient } from '@epilot/targeting-client';
const targetingClient = getClient();
const result = await targetingClient.matchCampaigns(null, {
"campaign_ids": [
"80d910d9-1c7f-49f2-9a31-75d5a0f4c744"
],
"entity_refs": [
{
"entity_schema": "contact",
"entity_id": "5817e702-b5d5-4c65-8856-7af0b0aa4067"
}
]
});
同样,如果您想知道给定的实体是否是 specif目标的一部分:
import { getClient } from '@epilot/targeting-client';
const targetingClient = getClient();
const result = await targetingClient.matchTargets(null, {
"target_ids": [
"80d910d9-1c7f-49f2-9a31-75d5a0f4c744"
],
"entity_refs": [
{
"entity_schema": "contact",
"entity_id": "5817e702-b5d5-4c65-8856-7af0b0aa4067"
}
]
});