コード例 #1
0
  public PushResult sendPush(PushPayload pushPayload)
      throws APIConnectionException, APIRequestException {
    if (_globalSettingEnabled) {
      pushPayload.resetOptionsTimeToLive(_timeToLive);
      pushPayload.resetOptionsApnsProduction(_apnsProduction);
    }

    ResponseWrapper response = _httpClient.sendPost(_baseUrl, pushPayload.toString(), _authCode);

    return PushResult.fromResponse(response);
  }
コード例 #2
0
  public PushResult sendPush(String payloadString)
      throws APIConnectionException, APIRequestException {
    ResponseWrapper response = _httpClient.sendPost(_baseUrl, payloadString, _authCode);

    return PushResult.fromResponse(response);
  }