com.akdeniz.googleplaycrawler.GooglePlay.ListResponse Java Examples

The following examples show how to use com.akdeniz.googleplaycrawler.GooglePlay.ListResponse. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GooglePlayAPI.java    From raccoon4 with Apache License 2.0 6 votes vote down vote up
/**
 * 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();
}
 
Example #2
Source File: GooglePlayAPI.java    From raccoon4 with Apache License 2.0 6 votes vote down vote up
/**
 * 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();
}
 
Example #3
Source File: GooglePlayAPI.java    From dummydroid with Apache License 2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #4
Source File: GooglePlayAPI.java    From dummydroid with Apache License 2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #5
Source File: Unwrap.java    From raccoon4 with Apache License 2.0 5 votes vote down vote up
public static ListResponse listResponse(ResponseWrapper rw) {
	Payload pl = payload(rw);
	if (pl.hasListResponse()) {
		return pl.getListResponse();
	}
	return ListResponse.getDefaultInstance();
}
 
Example #6
Source File: GooglePlayAPI.java    From Raccoon with Apache License 2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #7
Source File: GooglePlayAPI.java    From Raccoon with Apache License 2.0 5 votes vote down vote up
/**
 * 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();
}
 
Example #8
Source File: GooglePlayAPI.java    From raccoon4 with Apache License 2.0 4 votes vote down vote up
public ListResponse nextPage(String url) throws IOException {
	ResponseWrapper responseWrapper = executeGETRequest(FDFE_URL + url, null);
	return responseWrapper.getPayload().getListResponse();
}
 
Example #9
Source File: GooglePlayAPI.java    From dummydroid with Apache License 2.0 2 votes vote down vote up
/**
 * 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);
}
 
Example #10
Source File: GooglePlayAPI.java    From raccoon4 with Apache License 2.0 2 votes vote down vote up
/**
 * 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);
}
 
Example #11
Source File: GooglePlayAPI.java    From Raccoon with Apache License 2.0 2 votes vote down vote up
/**
 * 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);
}