diff --git a/README.md b/README.md index 4d8c6a3..3995646 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,40 @@ -dimension_apn -===== +# 基于erlang的推送服务 -An OTP application +## api接口 -Build ------ - $ rebar3 compile +### 1. 批量推送消息 + +url: "/api/push" +method: POST +body: + +```json +[ + { + "device_token": "b48b911e85874b403ce80cbb33864e8ed6f06455e80310b0f6b95e672a3e39dc", + "title": "动物狂响曲", + "body": "第7集(校服与被毛更深处),bilibili已更新", + "custom_data": { + "target": "detail", + "params": { + "drama_id": 1234 + } + } + }, + + { + "device_token": "b48b911e85874b403ce80cbb33864e8ed6f06455e80310b0f6b95e672a3e39dc", + "title": "动物狂响曲", + "body": "第7集(校服与被毛更深处),bilibili已更新", + "custom_data": { + "target": "detail", + "params": { + "drama_id": 1234 + } + } + } +] +``` +字段说明: + custom_data使用指定页面的跳转逻辑,target字段目前固定为: detail;参数部分的: drama_id指定为要进入的详情页面id \ No newline at end of file