push-对外接口文档.md
1.67 KB
push 对外接口文档
1、生成推送任务接口
适用场景:
- 针对一批确定的用户,比如订阅了某个秒杀活动的20W用户,给他们推
秒杀活动即将开始
的消息。
对接方式:
- 直接往rabbitMQ写一条消息进MQ, 所有
push
节点会监听MQ, 接收到推送任务之后,进行推送。- topic类型 :
yoho_task_push
- topic类型 :
消息格式体
参数名称 | 参数类型 | 可否为空 | 参数解释 | 默认值 | 备注 |
---|---|---|---|---|---|
androidTitle | String | 是 | 安卓推送标题 | null | 无 |
androidContent | String | 是 | 安卓推送内容 | null | 安卓的推送分为title和content两部分 |
iosAlert | String | 是 | ios推送内容 | null | ios的推送只有alert |
appendParams | String | 否 | APP跳转链接 | null | 必须为JSON格式 的字符串,给APP跳转使用 |
sendTime | long | 否 | 发送时间 | null | 可做定时用,此值小于PUSH服务器的时间即会发送 |
sceneType | String | 否 | 此次推送的场景 | null | 如品牌上新 为ADDED_BRANDS |
sceneKey | String | 否 | 此次推送的场景key | null | 如品牌上新 时此值为brand_id |
uids | List | 否 | 推送给哪些用户 | null | 大小不要超过10000,数据量大时业务方自己做分片 |
iosVersions | List | 是 | ios版本号 | null | 无 |
androidVersions | List | 是 | 安卓的版本号 | null | 无 |
- 参数申明
- androidTitle和androidContent同时为空,则不会生成安卓的推送任务。
- iosAlert为空,则不会生成ios的推送任务。
- sceneType 和 sceneKey 很重要,大数据统计时会用到,请合理命名。
- uids大小不要超过1W,数据量大时,请自行分片。