如何获取Google我的商家Api中日期范围内的所有评论?
How to get all the reviews within the date range in Google My Business Api?
对于我的应用程序,我想获得对特定位置的评论,以便我在 api 以下使用并且它工作正常。
$location = "*location*";
$access_token = "*token*";
$url = "https://mybusiness.googleapis.com/v4/".$location_name."/reviews?access_token=".$access_token;
到目前为止,我如何在日期范围内获得评论我已尝试使用以下代码..
$url = "https://mybusiness.googleapis.com/v4/".$location_name."/reviews?access_token=".$access_token."&startTime=".$start_time."&endTime=".$end_time;
上面的代码不工作请给我任何建议。
我提到了这个 link Time range filter link
请帮助我找到解决方案。
抱歉,Google 没有将 "timeRange" 记录为查询参数选项。
唯一的选项是 pageSize
、pageToken
和 orderBy
。
来源:https://developers.google.com/my-business/reference/rest/v4/accounts.locations.reviews/list
你也可以试试 third-party API;如果你只需要它一次使用,你可以通过以下方式快速提取你需要的东西:https://www.reviewsmaker.com/api/date-range/
上述工具使用的方法有一个用于 RM API 的 GUI,它抓取所有评论和 re-loops 通过具有所需日期范围的数组(从而计算匹配总数);当它提醒并显示所查询地点 ID 的金额时;通过一些 JS 技能,您可以轻松地将其调整为您的结果;
您也可以使用本地 GMB API 来完成此操作,方法是解析所有评论并将它们存储在临时数组中;并遍历该数组,其中审查日期 >= 您的开始日期变量并且 <= 您的结束日期变量;
简而言之,这是肯定可行的:)
对于我的应用程序,我想获得对特定位置的评论,以便我在 api 以下使用并且它工作正常。
$location = "*location*";
$access_token = "*token*";
$url = "https://mybusiness.googleapis.com/v4/".$location_name."/reviews?access_token=".$access_token;
到目前为止,我如何在日期范围内获得评论我已尝试使用以下代码..
$url = "https://mybusiness.googleapis.com/v4/".$location_name."/reviews?access_token=".$access_token."&startTime=".$start_time."&endTime=".$end_time;
上面的代码不工作请给我任何建议。
我提到了这个 link Time range filter link
请帮助我找到解决方案。
抱歉,Google 没有将 "timeRange" 记录为查询参数选项。
唯一的选项是 pageSize
、pageToken
和 orderBy
。
来源:https://developers.google.com/my-business/reference/rest/v4/accounts.locations.reviews/list
你也可以试试 third-party API;如果你只需要它一次使用,你可以通过以下方式快速提取你需要的东西:https://www.reviewsmaker.com/api/date-range/
上述工具使用的方法有一个用于 RM API 的 GUI,它抓取所有评论和 re-loops 通过具有所需日期范围的数组(从而计算匹配总数);当它提醒并显示所查询地点 ID 的金额时;通过一些 JS 技能,您可以轻松地将其调整为您的结果;
您也可以使用本地 GMB API 来完成此操作,方法是解析所有评论并将它们存储在临时数组中;并遍历该数组,其中审查日期 >= 您的开始日期变量并且 <= 您的结束日期变量;
简而言之,这是肯定可行的:)