<?php include "local.php"; include "../proto/protocolbuffers.inc.php"; include "../proto/market.proto.php"; include "../Market/MarketSession.php"; $session = new MarketSession(); $session->login(GOOGLE_EMAIL, GOOGLE_PASSWD); $session->setAndroidId(ANDROID_DEVICEID); $appId = "7059973813889603239"; $imageId = 1; $gir = new GetImageRequest(); $gir->setImageUsage(GetImageRequest_AppImageUsage::SCREENSHOT); $gir->setAppId($appId); $gir->setImageId($imageId); $reqGroup = new Request_RequestGroup(); $reqGroup->setImageRequest($gir); $response = $session->execute($reqGroup); $groups = $response->getResponsegroupArray(); #echo "<xmp>".print_r($groups, true)."</xmp>"; foreach ($groups as $rg) { $imageResponse = $rg->getImageResponse(); file_put_contents("../" . $appId . "_" . $imageId . ".png", $imageResponse->getImageData()); ?> <img src="../<?php echo $appId . "_" . $imageId . ".png"; ?> "><?php }
#$ar->setAppType(AppType::WALLPAPER); $reqGroup = new Request_RequestGroup(); $reqGroup->setAppsRequest($ar); $response = $session->execute($reqGroup); $groups = $response->getResponsegroupArray(); foreach ($groups as $rg) { $appsResponse = $rg->getAppsResponse(); $apps = $appsResponse->getAppArray(); foreach ($apps as $app) { echo $app->getTitle() . " (" . $app->getId() . ")<br/>"; echo $app->getExtendedInfo()->getDescription() . "<br/><br/>"; //Get comments echo "<div style=\"padding-left:20px\">"; $cr = new CommentsRequest(); $cr->setAppId($app->getId()); $cr->setEntriesCount(3); $reqGroup = new Request_RequestGroup(); $reqGroup->setCommentsRequest($cr); $response = $session->execute($reqGroup); $groups = $response->getResponsegroupArray(); foreach ($groups as $rg) { $commentsResponse = $rg->getCommentsResponse(); $comments = $commentsResponse->getCommentsArray(); foreach ($comments as $comment) { echo "<strong>" . $comment->getAuthorName() . "</strong> [" . str_repeat("*", $comment->getRating()) . "]<br/>"; echo $comment->getText() . "<br/><br/>"; } } echo "</div>"; } }
<?php include "local.php"; include "../proto/protocolbuffers.inc.php"; include "../proto/market.proto.php"; include "../Market/MarketSession.php"; $session = new MarketSession(); $session->login(GOOGLE_EMAIL, GOOGLE_PASSWD); $session->setAndroidId(ANDROID_DEVICEID); $cr = new CategoriesRequest(); $reqGroup = new Request_RequestGroup(); $reqGroup->setCategoriesRequest($cr); $response = $session->execute($reqGroup); $groups = $response->getResponsegroupArray(); foreach ($groups as $rg) { $categoriesResponse = $rg->getCategoriesResponse(); $categories = $categoriesResponse->getCategoriesArray(); foreach ($categories as $category) { echo $category->getTitle() . "<br/>"; $subcategories = $category->getSubCategoriesArray(); foreach ($subcategories as $subcategory) { echo "- " . $subcategory->getTitle() . "<br/>"; } } }