2014-09-26 2 views
1

Google Places API позволяет мне получить рейтинги за место так:API Google Адресов, рейтинги с указанием даты и времени

https://maps.googleapis.com/maps/api/place/details/json?placeid= <> & ключ = <>

Затем он возвращает общий рейтинг место, подобное этому:

...  
"result" : { 

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

Можно ли также получить рейтинг с датой? Не только агрегированное значение.

+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 
    } 
+0

Но это вы получаете, только когда кто-то делает обзор, вы не получаете отметку времени, если кто-то просто оценивает ее. – Chris

Смежные вопросы