public ResponseWrapper sendGet(String url) throws APIConnectionException, APIRequestException { return sendGet(url, null); }
public TagAliasResult getDeviceTagAlias(String registrationId) throws APIConnectionException, APIRequestException { String url = hostName + devicesPath + "/" + registrationId; ResponseWrapper response = _httpClient.sendGet(url); return BaseResult.fromResponse(response, TagAliasResult.class); }
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); }
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); }
public TagListResult getTagList() throws APIConnectionException, APIRequestException { String url = hostName + tagsPath + "/"; ResponseWrapper response = _httpClient.sendGet(url); return TagListResult.fromResponse(response, TagListResult.class); }
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); }
public TagListResult getTagList() throws APIConnectionException, APIRequestException { String url = hostName + tagsPath + "/"; ResponseWrapper response = _httpClient.sendGet(url); return TagListResult.fromResponse(response, TagListResult.class); }
public TagAliasResult getDeviceTagAlias(String registrationId) throws APIConnectionException, APIRequestException { String url = hostName + devicesPath + "/" + registrationId; ResponseWrapper response = _httpClient.sendGet(url); return BaseResult.fromResponse(response, TagAliasResult.class); }
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); }
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); }
public ReceivedsResult getReceiveds(String msgIds) throws APIConnectionException, APIRequestException { checkMsgids(msgIds); String url = _hostName + _receivePath + "?msg_ids=" + msgIds; ResponseWrapper response = _httpClient.sendGet(url); return ReceivedsResult.fromResponse(response); }
public MessagesResult getMessages(String msgIds) throws APIConnectionException, APIRequestException { checkMsgids(msgIds); String url = _hostName + _messagePath + "?msg_ids=" + msgIds; ResponseWrapper response = _httpClient.sendGet(url); return MessagesResult.fromResponse(response); }
public MessagesResult getMessages(String msgIds) throws APIConnectionException, APIRequestException { checkMsgids(msgIds); String url = _hostName + _messagePath + "?msg_ids=" + msgIds; ResponseWrapper response = _httpClient.sendGet(url); return MessagesResult.fromResponse(response); }
public ScheduleListResult getScheduleList(int page) throws APIConnectionException, APIRequestException{ Preconditions.checkArgument(page > 0, "page should more than 0."); ResponseWrapper response = _httpClient.sendGet(hostName + schedulePath + "?page=" + page); return ScheduleListResult.fromResponse(response, ScheduleListResult.class); }
public ReceivedsResult getReceiveds(String msgIds) throws APIConnectionException, APIRequestException { checkMsgids(msgIds); String url = _hostName + _receivePath + "?msg_ids=" + msgIds; ResponseWrapper response = _httpClient.sendGet(url); return ReceivedsResult.fromResponse(response); }
public ScheduleListResult getScheduleList(int page) throws APIConnectionException, APIRequestException{ Preconditions.checkArgument(page > 0, "page should more than 0."); ResponseWrapper response = _httpClient.sendGet(hostName + schedulePath + "?page=" + page); return ScheduleListResult.fromResponse(response, ScheduleListResult.class); }
public ScheduleMsgIdsResult getScheduleMsgIds(String scheduleId) throws APIConnectionException, APIRequestException{ Preconditions.checkArgument(StringUtils.isNotEmpty(scheduleId), "scheduleId should not be empty"); ResponseWrapper response = _httpClient.sendGet(hostName + schedulePath + "/" + scheduleId + "/msg_ids"); return ScheduleResult.fromResponse(response, ScheduleMsgIdsResult.class); }
public ScheduleResult getSchedule(String scheduleId) throws APIConnectionException, APIRequestException{ Preconditions.checkArgument(StringUtils.isNotEmpty(scheduleId), "scheduleId should not be empty"); ResponseWrapper response = _httpClient.sendGet(hostName + schedulePath + "/" + scheduleId); return ScheduleResult.fromResponse(response, ScheduleResult.class); }
public ScheduleResult getSchedule(String scheduleId) throws APIConnectionException, APIRequestException{ Preconditions.checkArgument(StringUtils.isNotEmpty(scheduleId), "scheduleId should not be empty"); ResponseWrapper response = _httpClient.sendGet(hostName + schedulePath + "/" + scheduleId); return ScheduleResult.fromResponse(response, ScheduleResult.class); }
public ScheduleMsgIdsResult getScheduleMsgIds(String scheduleId) throws APIConnectionException, APIRequestException{ Preconditions.checkArgument(StringUtils.isNotEmpty(scheduleId), "scheduleId should not be empty"); ResponseWrapper response = _httpClient.sendGet(hostName + schedulePath + "/" + scheduleId + "/msg_ids"); return ScheduleResult.fromResponse(response, ScheduleMsgIdsResult.class); }