本文整理匯總了Java中cn.jiguang.common.resp.BaseResult類的典型用法代碼示例。如果您正苦於以下問題:Java BaseResult類的具體用法?Java BaseResult怎麽用?Java BaseResult使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
BaseResult類屬於cn.jiguang.common.resp包,在下文中一共展示了BaseResult類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: sendPush
import cn.jiguang.common.resp.BaseResult; //導入依賴的package包/類
public PushResult sendPush(PushPayload pushPayload) throws APIConnectionException, APIRequestException {
Preconditions.checkArgument(! (null == pushPayload), "pushPayload should not be null");
if (_apnsProduction > 0) {
pushPayload.resetOptionsApnsProduction(true);
} else if(_apnsProduction == 0) {
pushPayload.resetOptionsApnsProduction(false);
}
if (_timeToLive >= 0) {
pushPayload.resetOptionsTimeToLive(_timeToLive);
}
ResponseWrapper response = _httpClient.sendPost(_baseUrl + _pushPath, pushPayload.toString());
return BaseResult.fromResponse(response, PushResult.class);
}
示例2: sendPushValidate
import cn.jiguang.common.resp.BaseResult; //導入依賴的package包/類
public PushResult sendPushValidate(PushPayload pushPayload) throws APIConnectionException, APIRequestException {
Preconditions.checkArgument(! (null == pushPayload), "pushPayload should not be null");
if (_apnsProduction > 0) {
pushPayload.resetOptionsApnsProduction(true);
} else if(_apnsProduction == 0) {
pushPayload.resetOptionsApnsProduction(false);
}
if (_timeToLive >= 0) {
pushPayload.resetOptionsTimeToLive(_timeToLive);
}
ResponseWrapper response = _httpClient.sendPost(_baseUrl + _pushValidatePath, pushPayload.toString());
return BaseResult.fromResponse(response, PushResult.class);
}
示例3: getAliasDeviceList
import cn.jiguang.common.resp.BaseResult; //導入依賴的package包/類
public AliasDeviceListResult getAliasDeviceList(String alias, String platform) throws APIConnectionException, APIRequestException {
String url = hostName + aliasesPath + "/" + alias;
if (null != platform) {
url += "?platform=" + platform;
}
ResponseWrapper response = _httpClient.sendGet(url);
return BaseResult.fromResponse(response, AliasDeviceListResult.class);
}
示例4: getUsers
import cn.jiguang.common.resp.BaseResult; //導入依賴的package包/類
public UsersResult getUsers(TimeUnit timeUnit, String start, int duration)
throws APIConnectionException, APIRequestException {
String startEncoded = null;
try {
startEncoded = URLEncoder.encode(start, "utf-8");
} catch (Exception e) {
}
String url = _hostName + _userPath
+ "?time_unit=" + timeUnit.toString()
+ "&start=" + startEncoded + "&duration=" + duration;
ResponseWrapper response = _httpClient.sendGet(url);
return BaseResult.fromResponse(response, UsersResult.class);
}
示例5: isDeviceInTag
import cn.jiguang.common.resp.BaseResult; //導入依賴的package包/類
public BooleanResult isDeviceInTag(String theTag, String registrationID) throws APIConnectionException, APIRequestException {
String url = hostName + tagsPath + "/" + theTag + "/registration_ids/" + registrationID;
ResponseWrapper response = _httpClient.sendGet(url);
return BaseResult.fromResponse(response, BooleanResult.class);
}
示例6: getDeviceTagAlias
import cn.jiguang.common.resp.BaseResult; //導入依賴的package包/類
public TagAliasResult getDeviceTagAlias(String registrationId) throws APIConnectionException, APIRequestException {
String url = hostName + devicesPath + "/" + registrationId;
ResponseWrapper response = _httpClient.sendGet(url);
return BaseResult.fromResponse(response, TagAliasResult.class);
}