Here are the examples of the java api class com.akdeniz.googleplaycrawler.GooglePlay.ListResponse taken from open source projects.
1. googleplay#recommendationsCommand()
Project: google-play-crawler
File: googleplay.java
File: googleplay.java
private void recommendationsCommand() throws Exception { login(); String packageName = namespace.getString("package"); RECOMMENDATION_TYPE type = (RECOMMENDATION_TYPE) namespace.get("type"); Integer offset = namespace.getInt("offset"); Integer number = namespace.getInt("number"); ListResponse recommendations = service.recommendations(packageName, type, offset, number); if (recommendations.getDoc(0).getChildCount() == 0) { System.out.println("No recommendation found!"); } else { for (DocV2 child : recommendations.getDoc(0).getChildList()) { System.out.println(child.getDetails().getAppDetails().getPackageName()); } } }
2. TestGooglePlayCrawler#shouldListSubCategories()
Project: google-play-crawler
File: TestGooglePlayCrawler.java
File: TestGooglePlayCrawler.java
@Test(dependsOnMethods = { "shouldLogin" }) public void shouldListSubCategories() throws Exception { ListResponse listResponse = service.list("GAME", "apps_topselling_free", 6, 36); Assert.assertFalse(listResponse.getDocList().isEmpty()); }
3. TestGooglePlayCrawler#shouldList()
Project: google-play-crawler
File: TestGooglePlayCrawler.java
File: TestGooglePlayCrawler.java
@Test(dependsOnMethods = { "shouldLogin" }) public void shouldList() throws Exception { ListResponse listResponse = service.list("GAME", null, null, null); Assert.assertFalse(listResponse.getDocList().isEmpty()); }
4. googleplay#listCommand()
Project: google-play-crawler
File: googleplay.java
File: googleplay.java
private void listCommand() throws Exception { login(); String category = namespace.getString("category"); String subcategory = namespace.getString("subcategory"); Integer offset = namespace.getInt("offset"); Integer number = namespace.getInt("number"); ListResponse listResponse = service.list(category, subcategory, offset, number); if (subcategory == null) { System.out.println(SUBCATEGORIES_HEADER); for (DocV2 child : listResponse.getDocList()) { String formatted = new StringJoiner(DELIMETER).add(child.getDocid()).add(child.getTitle()).toString(); System.out.println(formatted); } } else { System.out.println(LIST_HEADER); for (DocV2 child : listResponse.getDoc(0).getChildList()) { AppDetails appDetails = child.getDetails().getAppDetails(); String formatted = new StringJoiner(DELIMETER).add(child.getTitle()).add(appDetails.getPackageName()).add(child.getCreator()).add(child.getOffer(0).getFormattedAmount()).add(String.valueOf(appDetails.getInstallationSize())).add(appDetails.getNumDownloads()).toString(); System.out.println(formatted); } } }