JPush API Caller for node.js
极光推送自用API,供node.js。
Usage
npm install jpusher
Example
var JPusher = ; var jPusher = JPusher;var param = JPusher; param;param;jPusher;
Param Functions
- setReceiverType: set the receiver type. (
ReceiverType.RT_ALL
,ReceiverType.RT_TAG
,ReceiverType.RT_ALIAS
, default to ALL) - addReceivers: add receivers. (param is an array)
- setReceivers: set receivers. (param is an array)
- setMsgType: set message type. (
MsgType.MT_NOTIFICATION
,MsgType.MT_CUSTOMIZE
, default to NOTIFICATION) - setAndroidContent: set android custom content. (only when msgType is
MT_CUSTOMIZE
) - setIOSProperty: params are
badge
andsound
. - setTitle: set message title. (default to app name)
- setBuildId: set builder id. (default to 0, refer to http://docs.jpush.cn/pages/viewpage.action?pageId=557243)
- setOverrideId: set override id. (default to null)
- setTimeToLive: set time to live. (default to 86400)
- setAPNsProduction: set APNs production. (
APNsType.AT_DEVELOPMENT
,APNsType.AT_PRODUCTION
,APNsType.AT_DEFAULT
, default to DEFAULT) - setPlatform: set platform array. (default to
[ "android", "ios" ]
) - setDescription: set push description.