public TagAliasResult getDeviceTagAlias(String registrationId) { String url = HOST_NAME_SSL + DEVICES_PATH + "/" + registrationId; String auth = Base64.getBase64Encode(this.appKey + ":" + this.masterSecret); ResponseWrapper response = this.sendGet(url, auth, null); return(TagAliasResult.fromResponse(response)); }
public static TagAliasResult fromResponse(ResponseWrapper responseWrapper) { TagAliasResult tagAliasResult = new TagAliasResult(); if (responseWrapper.isServerResponse()) { tagAliasResult = JsonConvert.DeserializeObject<TagAliasResult>(responseWrapper.responseContent); } tagAliasResult.ResponseResult = responseWrapper; return tagAliasResult; }
//GET /v3/devices/{registration_id} //获取当前设备的所有属性,包含tags, alias,手机号码mobile。 public TagAliasResult getDeviceTagAlias(String registrationId) { Preconditions.checkArgument(!String.IsNullOrEmpty(registrationId), "registrationId should be set"); String url = HOST_NAME_SSL + DEVICES_PATH + "/" + registrationId; String auth = Base64.getBase64Encode(this.appKey + ":" + this.masterSecret); ResponseWrapper response = this.sendGet(url, auth, null); return(TagAliasResult.fromResponse(response)); }
public static TagAliasResult fromResponse(ResponseWrapper responseWrapper) { TagAliasResult tagAliasResult = new TagAliasResult(); if (responseWrapper.isServerResponse()) { tagAliasResult = (TagAliasResult)JsonConvert.DeserializeObject <TagAliasResult>(responseWrapper.responseContent); } tagAliasResult.ResponseResult = responseWrapper; return(tagAliasResult); }
public TagAliasResult getDeviceTagAlias(string registrationId) { Preconditions.checkArgument(!string.IsNullOrEmpty(registrationId), (object)"registrationId should be set"); return(TagAliasResult.fromResponse(this.sendGet("https://device.jpush.cn/v3/devices/" + registrationId, Base64.getBase64Encode(this.appKey + ":" + this.masterSecret), (string)null))); }