跳至内容
Cobub文档中心
用户工具
登录
站点工具
工具
显示页面
修订记录
反向链接
媒体管理器
网站地图
登录
媒体管理器
网站地图
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
====== User Menu of PNS ====== The document introduces usage of PNS Web interface. Here are the concepts of user channel and tag channel, which must be clarified: * user channel is named by the unique uid of mobile device. PNS will sub the uid automatically when the connection is setup (sub means join channel) * tag channel is the mobile clients group(uid group) setup by sub API. for instance, a client sub “location:beijing”, then it will join into channel “location:beijing”, when push messages to “location:beijing”, the clients in group of “location:beijing” will receive messages. Tag channel can be treated as a group for tag push. ===== Invoking the Web interface ===== Developers need to POST data to Web interface, and the Web interface will return result in JSON. If the following is configured in the file of toaster.conf: <code>[web] bind localhost:8080</code> Then you can call Web Interface using the following Linux command, or call it by programming of HTTP: <code>curl –X POST –d POST_DATA http://localhost:8080/METHOD_NAME</code> inside <code>POST_DATA is POST data to PNS METHOD_NAME is the method name to be called</code> ===== Push to a single user or multiple users(pub) ===== METHOD_NAME: pub POST_DATA: <code>"expired": "1403521931", "appid": "XXX", "channel": "xxx@qq.com", "channel": "xxx@gmail.com", "data": "hello world" </code> ===== Push to specified one or more tag channels (tagpub) ===== ===== Push to all the users of an APP (allpub) ===== ===== Add uid to tag-channel (sub-tag) ===== ===== Remove uid form tag-channel(unsub-tag) ===== ===== Push task query (message) ===== ===== User channel query (userchannel) ===== ===== Tag channel query (tagchannel) ===== ===== APP query(app-size) =====
en/toaster/user-menu-of-pns.1426832144.txt.gz
· 最后更改: 2017/07/14 11:12 (外部编辑)
页面工具
显示页面
修订记录
反向链接
回到顶部