Examples of ResponseWrapper


Examples of cn.jpush.api.common.ResponseWrapper

    public ReceivedsResult getReceiveds(String msgIds)
            throws APIConnectionException, APIRequestException {
        checkMsgids(msgIds);
       
        String url = REPORT_HOST_NAME + REPORT_RECEIVE_PATH + "?msg_ids=" + msgIds;
        ResponseWrapper response = _httpClient.sendGet(url, null);
       
        return ReceivedsResult.fromResponse(response);
  }
View Full Code Here

Examples of com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper

     * Fetches a search results for given query. Offset and numberOfResult
     * parameters are optional and <code>null</code> can be passed!
     */
    public SearchResponse search(String query, Integer offset, Integer numberOfResult) throws IOException {

  ResponseWrapper responseWrapper = executeGETRequest(SEARCH_URL,
    new String[][] { { "c", "3" }, { "q", query }, { "o", (offset == null) ? null : String.valueOf(offset) },
      { "n", (numberOfResult == null) ? null : String.valueOf(numberOfResult) }, });

  return responseWrapper.getPayload().getSearchResponse();
    }
View Full Code Here

Examples of com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper

     * Fetches detailed information about passed package name. If it is needed
     * to fetch information about more than one application, consider to use
     * <code>bulkDetails</code>.
     */
    public DetailsResponse details(String packageName) throws IOException {
  ResponseWrapper responseWrapper = executeGETRequest(DETAILS_URL, new String[][] { { "doc", packageName }, });

  return responseWrapper.getPayload().getDetailsResponse();
    }
View Full Code Here

Examples of com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper

    public BulkDetailsResponse bulkDetails(List<String> packageNames) throws IOException {

  Builder bulkDetailsRequestBuilder = BulkDetailsRequest.newBuilder();
  bulkDetailsRequestBuilder.addAllDocid(packageNames);

  ResponseWrapper responseWrapper = executePOSTRequest(BULKDETAILS_URL, bulkDetailsRequestBuilder.build().toByteArray(),
    "application/x-protobuf");

  return responseWrapper.getPayload().getBulkDetailsResponse();
    }
View Full Code Here

Examples of com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper

  return browse(null, null);
    }

    public BrowseResponse browse(String categoryId, String subCategoryId) throws IOException {

  ResponseWrapper responseWrapper = executeGETRequest(BROWSE_URL, new String[][] { { "c", "3" }, { "cat", categoryId },
    { "ctr", subCategoryId } });

  return responseWrapper.getPayload().getBrowseResponse();
    }
View Full Code Here

Examples of com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper

     *
     * Default values for offset and numberOfResult are "0" and "20"
     * respectively. These values are determined by Google Play Store.
     */
    public ListResponse list(String categoryId, String subCategoryId, Integer offset, Integer numberOfResult) throws IOException {
  ResponseWrapper responseWrapper = executeGETRequest(LIST_URL, new String[][] { { "c", "3" }, { "cat", categoryId },
    { "ctr", subCategoryId }, { "o", (offset == null) ? null : String.valueOf(offset) },
    { "n", (numberOfResult == null) ? null : String.valueOf(numberOfResult) }, });

  return responseWrapper.getPayload().getListResponse();
    }
View Full Code Here

Examples of com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper

     * This function is used for fetching download url and donwload cookie,
     * rather than actual purchasing.
     */
    private BuyResponse purchase(String packageName, int versionCode, int offerType) throws IOException {

  ResponseWrapper responseWrapper = executePOSTRequest(PURCHASE_URL, new String[][] { { "ot", String.valueOf(offerType) },
    { "doc", packageName }, { "vc", String.valueOf(versionCode) }, });

  return responseWrapper.getPayload().getBuyResponse();
    }
View Full Code Here

Examples of com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper

     * Default values for offset and numberOfResult are "0" and "20"
     * respectively. These values are determined by Google Play Store.
     */
    public ReviewResponse reviews(String packageName, REVIEW_SORT sort, Integer offset, Integer numberOfResult)
      throws IOException {
  ResponseWrapper responseWrapper = executeGETRequest(REVIEWS_URL,
    new String[][] { { "doc", packageName }, { "sort", (sort == null) ? null : String.valueOf(sort.value) },
      { "o", (offset == null) ? null : String.valueOf(offset) },
      { "n", (numberOfResult == null) ? null : String.valueOf(numberOfResult) } });

  return responseWrapper.getPayload().getReviewResponse();
    }
View Full Code Here

Examples of com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper

     */
    public UploadDeviceConfigResponse uploadDeviceConfig() throws Exception {

  UploadDeviceConfigRequest request = UploadDeviceConfigRequest.newBuilder()
    .setDeviceConfiguration(Utils.getDeviceConfigurationProto()).build();
  ResponseWrapper responseWrapper = executePOSTRequest(UPLOADDEVICECONFIG_URL, request.toByteArray(),
    "application/x-protobuf");
  return responseWrapper.getPayload().getUploadDeviceConfigResponse();
    }
View Full Code Here

Examples of com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper

     * Default values for offset and numberOfResult are "0" and "20"
     * respectively. These values are determined by Google Play Store.
     */
    public ListResponse recommendations(String packageName, RECOMMENDATION_TYPE type, Integer offset, Integer numberOfResult)
      throws IOException {
  ResponseWrapper responseWrapper = executeGETRequest(RECOMMENDATIONS_URL,
    new String[][] { { "c", "3" }, { "doc", packageName }, { "rt", (type == null) ? null : String.valueOf(type.value) },
      { "o", (offset == null) ? null : String.valueOf(offset) },
      { "n", (numberOfResult == null) ? null : String.valueOf(numberOfResult) } });

  return responseWrapper.getPayload().getListResponse();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.