Google My Business API Get location profile image or logo - google-api

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!

The only way is iterate through all MediaItem's

Related

How to track Google conversions with Joomla Chronoforms?

I have multiple form pages and one thank you-page.
I want to track if a form has successfully submitted, but I don't know how.
When a user submits a form and gets redirected to the thank you page, it'll add different parameters to the url of the thank you page. This depends on where the user came from.
E.g www.mywebsite.com/page/nameofpage?chronoform=nameofpage&event=submit
How can I track this?
You can set this up completely outside of Chronoforms. Within Google Analytics, go to Admin section, then Goals and set up a new website goal. The key is to select it to be a destination type goal and set that to your thank you page url.
https://support.google.com/analytics/answer/1032415?hl=enhttps://support.google.com/analytics/answer/1116091?hl=enIf you want to have the conversion work in Google Adwords conversions as well, you will need to add a code snippet to a custom HTML module in the debug position: https://support.google.com/adwords/answer/6331314
You should not use two conversion trackings for the same thing because you would end up double counting your conversions.
I see that your url has an event. Instead of using destination goals in google analytics you can use events to track a goal. After you do this you will have to link google analytics with google adwords and import the goal in google adwords.
Have in mind that conversion tracking from google analytics has a big conversion lag. Having said that, the best option is to use google adwords conversion tracking but this would require to have a unique url for each thank you page.

Get CRM WRPC-Token for display images in Webressource

In my CRM HTML-Webresource, I got to display E-Mail activities with it's images (saved as attachments) as HTML. I take the description attribute for that.
As I realized, at least in CRM-Online, every attachment-image has a WRPC-Token that I need for the correct file path to load it.
How can I get the token? Most of the solutions that I found are either old or don't work for my circumstances.
Can I fetch the token out of the given HTML?
This approach doesn't make sense to me,
Attachments are stored within a database behind a web service, they are not at a file path you can simply open.
WRPC-Token's are used in security, I'm not sure how it is relevant or could provide a file path.
I would suggest writing code to access the CRM web services, this will enable you to retrieve the attachment data. There is an example here Sample: Create, retrieve, update, and delete an email attachment.

Google similar image search API

I'm trying to find out if there is a way to do google similar image searches via an API?
I know the image search api is depreciated but is it still useable?
https://developers.google.com/image-search/
Also... It seems that you can do image searches with the custom search api but I can't seem to work out if a similar image search is possible.
http://thenextweb.com/dd/2012/02/14/googles-custom-search-api-now-supports-image-only-results/
Any leads on advice on working this our would be appreciated.
Thanks!
If you have a URL for a hosted image (using Dropbox, imgur, etc), the answer at https://stackoverflow.com/a/15134958/116891 shows you how to find similar images. Basically,
http://images.google.com/searchbyimage?image_url=YOUR_HOSTED_URL
That is deprecated.
But I need JSON format of similar images result.
So, I try to use google cse but this is not supported searching of similar images.
It's just displayed image search results in a custom domain.
Another method that i try is URL.
http://images.google.com/searchbyimage?image_url=YOUR_HOSTED_URL
But this is not solution what i need.
It is because able to use in the browser. I need JSON.
Conclude, I decide to use Vision API of Google.
This is very simple.
https://cloud.google.com/vision/
You can try on the top.
First, access the URL.
Second, upload your image file on the "Try API".
Third, click "JSON" tab menu on the result.
You can be seen JSON about similar images.

Google Drive API changes thumbnailLink value on every GET request?

I'm uploading some images to our GDrive account (via API) so I can publish them in our webapp.
I like to post thumbnailLink because of the =s parameter where you can scale the image to a desire width.
But now I've found a problem:
everytime I make a file get request (https://developers.google.com/drive/v2/reference/files/get) the thumbnailLink changes its value
This problem raises two questions:
Why does this happen?
Is there anyway I can keep the same thumbnailLink and make it
work forever?
edition: in file documentation (https://developers.google.com/drive/v2/reference/files) says that only downloadUrl has a short lived value
The thumbnail URL is also short lived (as some simple testing revealed). I'll work with the documentation team to also have this noted in the documentation.

How to find someone changed their Twitter profile image?

Say, with in my application, I have a list of friends (Twitter IDs) the user follow. I show their name and their image (from Twitter). Every time the user logs into the application, I want to get the recent profile display image from Twitter.
How do I know, someone changed their Twitter profile image?
Currently, I think, I need to get their image (I use Twitter API: GET users/profile_image/:screen_name) and find the modify time and if it is not newer, I assume it is not changed. Is there a better way of doing it? How would you do if you have to built something like this? I hate getting all the image files and checking them one after one. I hope there is a better way to get the images of those who have made a change to their profile recently.
You can try looking at http://api.twitter.com/1/account/verify_credentials.json and see if anything in there tracks profile changes although I doubt it. (Try using: https://dev.twitter.com/console for an easier interface).
If you can't find anything in the API, then there is not way to know that the profile image has changed without checking. In which case, you can store a hash of the old image, and compare the hash of any new images, and see if they match. If they do not, then you know it has changed.
Hope that helps.

Resources