Hi everybody !
I am currently playing with Glide and the Google place api.
Today, I have the name and address of an establishment, I would like that with this information, I manage to make an API request of the API google place, so that it completes me the other information (schedules, telephones, etc)
I can do the first part, from the name and address, find the place_id, then make the request and have all the information.
Where I get stuck: retrieve the answer from the first query to get the place_id and place this place_id in a specific column. (But I guess when I can do that, I can do the next thing)
And then, once I have my query with the place_id, associate the values of the response to the right columns.
Is this possible? And if so, could you help me?
Edit : Here is what I get from the request to get the place_id
{
   "predictions" : [
      {
         "description" : "Barabaar, 4 Bd des Brotteaux, 69006 Lyon, France",
         "matched_substrings" : [
            {
               "length" : 8,
               "offset" : 0
            },
            {
               "length" : 16,
               "offset" : 12
            },
            {
               "length" : 5,
               "offset" : 30
            },
            {
               "length" : 4,
               "offset" : 36
            }
         ],
         "place_id" : "ChIJRT8dL4zq9EcRp8tR4U6yxis",
         "reference" : "ChIJRT8dL4zq9EcRp8tR4U6yxis",
         "structured_formatting" : {
            "main_text" : "Barabaar",
            "main_text_matched_substrings" : [
               {
                  "length" : 8,
                  "offset" : 0
               }
            ],
            "secondary_text" : "4 Bd des Brotteaux, 69006 Lyon, France",
            "secondary_text_matched_substrings" : [
               {
                  "length" : 16,
                  "offset" : 2
               },
               {
                  "length" : 5,
                  "offset" : 20
               },
               {
                  "length" : 4,
                  "offset" : 26
               }
            ]
         },
         "terms" : [
            {
               "offset" : 0,
               "value" : "Barabaar"
            },
            {
               "offset" : 10,
               "value" : "4 Bd des Brotteaux"
            },
            {
               "offset" : 30,
               "value" : "69006"
            },
            {
               "offset" : 36,
               "value" : "Lyon"
            },
            {
               "offset" : 42,
               "value" : "France"
            }
         ],
         "types" : [ "bar", "restaurant", "food", "point_of_interest", "establishment" ]
      }
   ],
   "status" : "OK"
}
thanks in advance!
Sincerely,
Thomas

