Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google My Business API Get location profile image or logo

I am working with Google My Business API. I need to retrieve a location profile image or location logo url.

According to documentation I need MediaItem with Enum PROFILE or LOGO

Problem is that I found only bulk request:

GET https://mybusiness.googleapis.com/v4/{name=accounts/*/locations/*/media/*}

which returns all location media (any Enum).

In this case I have to run through response to find item I am searching for and it might be necessary to run multiple requests to access next feed pages.

This approach is irrational on my opinion.

Maybe I am missing something, so is there any way to get what I want in just one request?

Thanks in advance!

like image 745
Horuth Avatar asked Nov 16 '22 05:11

Horuth


1 Answers

The only way is iterate through all MediaItem's

like image 131
unbreak Avatar answered Jun 17 '23 17:06

unbreak