本文整理匯總了Java中com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper類的典型用法代碼示例。如果您正苦於以下問題:Java ResponseWrapper類的具體用法?Java ResponseWrapper怎麽用?Java ResponseWrapper使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ResponseWrapper類屬於com.akdeniz.googleplaycrawler.GooglePlay包,在下文中一共展示了ResponseWrapper類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: search
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/**
* 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();
}
示例2: details
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/**
* 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();
}
示例3: bulkDetails
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/** Equivalent of details but bulky one! */
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();
}
示例4: browse
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
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();
}
示例5: list
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/**
* Fetches applications within supplied category and sub-category. If
* <code>null</code> is given for sub-category, it fetches sub-categories of
* passed category.
*
* 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();
}
示例6: delivery
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
public DownloadData delivery(String packageName, int versionCode, int offerType)
throws IOException {
ResponseWrapper responseWrapper = executeGETRequest(DELIVERY_URL, new String[][] {
{ "ot", String.valueOf(offerType) },
{ "doc", packageName },
{ "vc", String.valueOf(versionCode) }, });
AndroidAppDeliveryData appDeliveryData = responseWrapper.getPayload().getDeliveryResponse()
.getAppDeliveryData();
return new DownloadData(this, appDeliveryData);
}
示例7: purchase
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/**
* 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();
}
示例8: reviews
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/**
* Fetches the reviews of given package name by sorting passed choice.
*
* 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();
}
示例9: uploadDeviceConfig
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/**
* Uploads device configuration to google server so that can be seen from web
* as a registered device!!
*
* @see https://play.google.com/store/account
*/
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();
}
示例10: recommendations
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/**
* Fetches the recommendations of given package name.
*
* 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();
}
示例11: executePOSTRequest
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/**
* Executes POST request and returns result as {@link ResponseWrapper}.
* Content type can be specified for given byte array.
*/
public ResponseWrapper executePOSTRequest(String url, byte[] datapost, String contentType)
throws IOException {
HttpEntity httpEntity = executePost(url, new ByteArrayEntity(datapost),
getHeaderParameters(this.getToken(), contentType));
return GooglePlay.ResponseWrapper.parseFrom(httpEntity.getContent());
}
示例12: list
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/**
* Fetches applications within supplied category and sub-category. If
* <code>null</code> is given for sub-category, it fetches sub-categories of
* passed category.
*
* 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();
}
示例13: reviews
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/**
* Fetches the reviews of given package name by sorting passed choice.
*
* 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();
}
示例14: uploadDeviceConfig
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/**
* Uploads device configuration to google server so that can be seen from web
* as a registered device!!
*
* @see https://play.google.com/store/account
*/
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();
}
示例15: recommendations
import com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper; //導入依賴的package包/類
/**
* Fetches the recommendations of given package name.
*
* 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();
}