// ----------------------------- Push API /// <summary> /// 想某个设备或者某设别列表推送一条通知,或者消息 /// </summary> /// <param name="PushPayload">推送的数据结构,包含平台信息推送目标,通知内容,消息内容与可选参数</param> /// <returns>成功时返回sendno和messageid,失败时有异常抛出</returns> /// <exception cref="APIRequestException">包含http错误码:如401,404等,错误信息,JPush returen code和JPush returen mssage</exception> /// <exception cref="APIConnectionException">包含错误的信息</exception> /// <see cref="http://docs.jpush.cn/display/dev/Push-API-v3"/> public MessageResult SendPush(PushPayload payload) { Preconditions.checkArgument(payload != null, "pushPayload should not be empty"); return(_pushClient.sendPush(payload)); }
// ----------------------------- Push API /// <summary> /// 想某个设备或者某设别列表推送一条通知,或者消息 /// </summary> /// <param name="PushPayload">推送的数据结构,包含平台信息推送目标,通知内容,消息内容与可选参数</param> /// <returns>成功时返回sendno和messageid,失败时有异常抛出</returns> /// <exception cref="APIRequestException">包含http错误码:如401,404等,错误信息,JPush returen code和JPush returen mssage</exception> /// <exception cref="APIConnectionException">包含错误的信息</exception> /// <see cref="http://docs.jpush.cn/display/dev/Push-API-v3"/> public MessageResult SendPush(PushPayload payload) { payload.CheckNotNull("pushPayload"); return(_pushClient.sendPush(payload)); }