gpt4 book ai didi

Foursquare field 得分/评级

转载 作者:行者123 更新时间:2023-12-02 00:07:37 24 4
gpt4 key购买 nike

有谁知道如何使用 Foursquare API 获取 field 的分数/评级(例如 9.0/10)?

我正在通过无用户访问进行连接。 https://developer.foursquare.com/overview/auth#userless

我在请求 field 详细信息时收到的 JSON blob 似乎不包括分数/评级。 https://developer.foursquare.com/docs/venues/venues

最佳答案

值得注意的是,首先,并非所有场馆都有评级。仅在特定情况下才会计算评分,例如是否有足够的关于某个场所的情绪数据来开始计算评分,以及该场所是否不是用户的家。

但是,如果场所确实计算了评分,并且您使用最新版本的 API 发出请求(确保您设置了最近几个月内的 v 参数),它将在 JSON 中返回从 API 如下,当您调用 /venues/<ID> 时:

{
response: {
venue: {
... // Other data about the venue will surround this, of course
rating: 7.18
}
}
... // The response's metadata will also be here
}

所以,基本上你想检查 response.venue.rating .

关于Foursquare field 得分/评级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17304353/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com