當前位置: 首頁>>代碼示例>>Java>>正文


Java ResponseWrapper類代碼示例

本文整理匯總了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();
}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:16,代碼來源:GooglePlayAPI.java

示例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();
}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:13,代碼來源:GooglePlayAPI.java

示例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();
}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:12,代碼來源:GooglePlayAPI.java

示例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();
	}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:10,代碼來源:GooglePlayAPI.java

示例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();
}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:20,代碼來源:GooglePlayAPI.java

示例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);
}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:12,代碼來源:GooglePlayAPI.java

示例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();
}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:15,代碼來源:GooglePlayAPI.java

示例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();
}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:17,代碼來源:GooglePlayAPI.java

示例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();
}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:15,代碼來源:GooglePlayAPI.java

示例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();
}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:18,代碼來源:GooglePlayAPI.java

示例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());

}
 
開發者ID:onyxbits,項目名稱:dummydroid,代碼行數:13,代碼來源:GooglePlayAPI.java

示例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();
}
 
開發者ID:onyxbits,項目名稱:raccoon4,代碼行數:20,代碼來源:GooglePlayAPI.java

示例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();
}
 
開發者ID:onyxbits,項目名稱:raccoon4,代碼行數:17,代碼來源:GooglePlayAPI.java

示例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();
}
 
開發者ID:onyxbits,項目名稱:raccoon4,代碼行數:15,代碼來源:GooglePlayAPI.java

示例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();
}
 
開發者ID:onyxbits,項目名稱:raccoon4,代碼行數:18,代碼來源:GooglePlayAPI.java


注:本文中的com.akdeniz.googleplaycrawler.GooglePlay.ResponseWrapper類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。