Google Places API,包含日期和时间的评分

时间:2014-09-26 15:45:12

标签: google-places-api

Google Places API允许我获取类似地点的评分:

https://maps.googleapis.com/maps/api/place/details/json?placeid=<>&安培;键= LT;>

然后返回该地点的整体评分:

...       
"result" : {

          "vicinity" : "...",
           "rating" : 3.7,
           "user_ratings_total" : 49
    ...

是否也可以通过日期时间获得每个评级?不只是聚合值。

1 个答案:

答案 0 :(得分:0)

是。看看这个Placeid: https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJOWSLUlcJ9YgR5Uxn4sbjYGk&key=<>

这是一个样本。注意“时间”标签:

     {
        "aspects" : [
           {
              "rating" : 3,
              "type" : "overall"
           }
        ],
        "author_name" : "Michaela O'Neal",
        "author_url" : "https://plus.google.com/105457747713750328544",
        "language" : "en",
        "rating" : 5,
        "text" : "Love to go here for breakfast! They have amazing croissants and there are definitely many choices to pick from! We always had a really nice server and if it's nice weather outside they have a cute patio. It might get a little too loud inside during weekends. ",
        "time" : 1401332428
     },
     {
        "aspects" : [
           {
              "rating" : 3,
              "type" : "overall"
           }
        ],
        "author_name" : "Myles Rothacker",
        "author_url" : "https://plus.google.com/115555770858439445523",
        "language" : "en",
        "rating" : 5,
        "text" : "I love the Eggs Benedict. Dollar the waiter is great.. I go in about 2 times a month have a few business meetings he is always at the top of his game. Timing when to refill, not interrupting and waiting until we are done to give me the check. This is a great place to have a morning meeting or a casual brunch. ",
        "time" : 1375492655
     }