Java源码示例:com.akdeniz.googleplaycrawler.GooglePlay.ListResponse

示例1
/**
 * 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();
}
 
示例2
/**
 * 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();
}
 
示例3
/**
 * 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();
}
 
示例4
/**
 * 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();
}
 
示例5
public static ListResponse listResponse(ResponseWrapper rw) {
	Payload pl = payload(rw);
	if (pl.hasListResponse()) {
		return pl.getListResponse();
	}
	return ListResponse.getDefaultInstance();
}
 
示例6
/**
 * 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();
}
 
示例7
/**
 * 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();
}
 
示例8
public ListResponse nextPage(String url) throws IOException {
	ResponseWrapper responseWrapper = executeGETRequest(FDFE_URL + url, null);
	return responseWrapper.getPayload().getListResponse();
}
 
示例9
/**
 * Equivalent of <code>list(categoryId, null, null, null)</code>. It fetches
 * sub-categories of given category!
 */
public ListResponse list(String categoryId) throws IOException {
	return list(categoryId, null, null, null);
}
 
示例10
/**
 * Fetches available categories * public BrowseResponse browse() throws
 * IOException {
 * 
 * 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(); }/*
 * 
 * /** Equivalent of <code>list(categoryId, null, null, null)</code>. It
 * fetches sub-categories of given category!
 */
public ListResponse list(String categoryId) throws IOException {
	return list(categoryId, null, null, null);
}
 
示例11
/**
 * Equivalent of <code>list(categoryId, null, null, null)</code>. It fetches
 * sub-categories of given category!
 */
public ListResponse list(String categoryId) throws IOException {
	return list(categoryId, null, null, null);
}