Подскажите, пожалуйста, как мне получить список всех обзоров? Я запрашиваю отзыв о своем приложении, но мне возвращается только самое последнее.
Для авторизации я создал учетную запись сервера, дал ей права на выпуск токена, загрузил. json файл и поместите его в папку root. Думаю, если бы что-то в этой части было некорректно, то я бы вообще не получал отзывов, но в моем случае приходит отзыв, но только 1, и нужен весь список отзывов.
Код отзыва:
<code>require_once 'vendor/autoload.php';
define('PACKAGE_NAME', 'spain.barcelona.myapplication'); //com.rssl.sboldb
putenv('GOOGLE_APPLICATION_CREDENTIALS='.__DIR__.'/api-6154269159051481497-574099-e0b562752ef6.json');
$client = new Google_Client();
$client->useApplicationDefaultCredentials();
$client->setScopes(Google_Service_AndroidPublisher::ANDROIDPUBLISHER);
$client->setAccessType("offline");
$service = new Google_Service_AndroidPublisher($client);
$response = $service->reviews->listReviews( PACKAGE_NAME );
echo "<pre>".print_r($response,true)."
";
Ответ:
Google_Service_AndroidPublisher_ReviewsListResponse Object(
[collection_key:protected] => reviews
[pageInfoType:protected] => Google_Service_AndroidPublisher_PageInfo
[pageInfoDataType:protected] =>
[reviewsType:protected] => Google_Service_AndroidPublisher_Review
[reviewsDataType:protected] => array
[tokenPaginationType:protected] => Google_Service_AndroidPublisher_TokenPagination
[tokenPaginationDataType:protected] =>
[internal_gapi_mappings:protected] => Array
(
)
[modelData:protected] => Array
(
)
[processed:protected] => Array
(
)
[reviews] => Array
(
[0] => Google_Service_AndroidPublisher_Review Object
(
[collection_key:protected] => comments
[authorName] => Natik Abasov
[commentsType:protected] => Google_Service_AndroidPublisher_Comment
[commentsDataType:protected] => array
[reviewId] => gp:AOqpTOESHBw_VPI7qg1p7PpjuZ8d9OIy35inocZlUZ_9npd1todn8SD9EyddObK9Jzw3vPVp81K1f_XUNCPldA
[internal_gapi_mappings:protected] => Array
(
)
[modelData:protected] => Array
(
)
[processed:protected] => Array
(
)
[comments] => Array
(
[0] => Google_Service_AndroidPublisher_Comment Object
(
[developerCommentType:protected] => Google_Service_AndroidPublisher_DeveloperComment
[developerCommentDataType:protected] =>
[userCommentType:protected] => Google_Service_AndroidPublisher_UserComment
[userCommentDataType:protected] =>
[internal_gapi_mappings:protected] => Array
(
)
[modelData:protected] => Array
(
)
[processed:protected] => Array
(
[developerComment] => 1
)
[userComment] => Google_Service_AndroidPublisher_UserComment Object
(
[androidOsVersion] =>
[appVersionCode] => 16
[appVersionName] => 16.0
[device] => beryllium
[deviceMetadataType:protected] => Google_Service_AndroidPublisher_DeviceMetadata
[deviceMetadataDataType:protected] =>
[lastModifiedType:protected] => Google_Service_AndroidPublisher_Timestamp
[lastModifiedDataType:protected] =>
[originalText] =>
[reviewerLanguage] => ru
[starRating] => 5
[text] => Great!
[thumbsDownCount] =>
[thumbsUpCount] =>
[internal_gapi_mappings:protected] => Array
(
)[modelData:protected] => Array()
[processed:protected] => Array
(
)
[lastModified] => Google_Service_AndroidPublisher_Timestamp Object
(
[nanos] => 270000000
[seconds] => 1596617390
[internal_gapi_mappings:protected] => Array
(
)
[modelData:protected] => Array
(
)
[processed:protected] => Array
(
)
)
[deviceMetadata] => Google_Service_AndroidPublisher_DeviceMetadata Object
(
[cpuMake] => Qualcomm
[cpuModel] => SDM845
[deviceClass] => FORM_FACTOR_PHONE
[glEsVersion] =>
[manufacturer] => Xiaomi
[nativePlatform] => ABI_ARM64_V8,ABI_ARM_V7,ABI_ARM
[productName] => beryllium (POCO F1)
[ramMb] =>
[screenDensityDpi] =>
[screenHeightPx] =>
[screenWidthPx] =>
[internal_gapi_mappings:protected] => Array
(
)
[modelData:protected] => Array
(
)
[processed:protected] => Array
(
)
)
)
)
)
)
)
)