Storing Data from Google Places API

后端 未结 3 483
再見小時候
再見小時候 2020-12-16 23:05

Please don\'t mind if this question sounds a little silly!

I am trying to learn more about Google Places API. I am interested in doing an implementation similar to

3条回答
  •  [愿得一人]
    2020-12-16 23:36

    1. I've read pretty much all of Places API's documentation and I have never once seen restrictions on what and what not you are allowed to store in a database. I would however recommend just storing the locations "reference" ID and just getting the details view HTTP every time so if a location's info changes, you are kept up-to-date.

    2. Of course you can do that, Google doesn't own country names :P

    3. Again, I would recommend storing the reference and accessing the location that way.

    4. A Place only has one ID. When you get the details of a place that ID will be returned every time. A reference, however, varies with each request. You cannot use an ID to get details about a Place but you can use a reference. An ID is useful for comparing places to see if they are the same as a location only has one ID.

    Keep the storage as light as possible. Keep only Place references and maybe IDs.

提交回复
热议问题