Empty description in Web Entities of Google Vision API - google-cloud-vision

If you try Google Vision API with follwoing demo-image.jpg
shown in QuickStart, you will get a record with empty description and score of 0.7024 in “Web Entities”. Why!?

I think this is working as intended. If you check the getDescrition() method from Java API libraries, you see that getDescrition() could return value or null for none.

Related

LinkedIn Content Api Migration to Version Api for Getting Image Source

I am migrating from LinkedIn V2 to Versioned Api 202211 on Content Api where i need to get the image source downloadUrl and display them along with the related text if any. attached is the postman Api call for easy reference.
Now i have used two Api's one is Post Api to get the urn:li:image that i get from calling /posts?author='. urlencode('urn:li:organization:' . anyID).'&q=author inside content-->media-->id array
Now Using Image Api and passing URLENCODE values inside
rest/images?ids=List(urn%3Ali%3Aimage%3AC5622AQEVKKoPW861Ow,urn%3Ali%3Aimage%3AD4D22AQF9zimfi4-aZw,urn%3Ali%3Aimage%3AC5622AQGuF8TOWVbOMw,urn%3Ali%3Aimage%3AC5622AQFellCxSUz98Q)
but the problem is, the order in which i am passing the urn:li:image as passes above is not the same order i am getting back as a response from the api. Neither its sorted in any manner . its just random order. Now mapping this array(that i got from using image api) with the one array above(got from Post Api) is a task in hand and it needs unnecessary reiteration . Attached is Postman call image .
The Result array i get from Image api needs to be added on the posts['elements'][index]['results] = image_api_rsp['results']['image:URN']['downloadUrl'].
Is there a problem in the Api or i am doing something wrong, because in postman also you can see the order in which i pass the value is not the same order i get the response.
Get Batch Images

GMB - Removal of LocationState object in Business Information API

Google deprecated the old GMB API v4.9 account.locations.get endpoint, and replaced it with Business Information API v1 locations.get.
Code change that affects me is:
Removal of LocationState object. The existing fields have been moved into Metadata.
The new Metadata object does not return the attributes LocationState object contained before. The ones I'm interested in are:
isVerified
isPublished
isSuspended
isDisabled
isDisconnected
etc...
My question is:
How could I get this data without using deprecated endpoints?
Try Verification API getVoiceOfMerchantState
isVerified (verify),
isPublished (hasVoiceOfMerchant=true AND hasBusinessAuthority=true),
isSuspended (complyWithGuidelines),
isDuplicate (resolveOwnershipConflict).
isDisabled & isDisconnected have no equivalent in new API
As far as I can see, based on the link you have sent it is written:
Endpoint URL:
Endpoints for all business information, attributes, categories, chains and locations search are accessible at https://mybusinessbusinessinformation.googleapis.com/v1/ instead of https://mybusiness.googleapis.com/v4/
The path name for locations endpoints has changed from
accounts/accountId/locations/locationId to locations/locationId
Maybe it was better if you could provide the request uri in the previous version so we could help you more precisely. Anyhow, what I tested in the google playground is as follows:
open [https://developers.google.com/oauthplayground]
after setting your clientId and Authorisation stuff, in the Request URI write
https://mybusinessbusinessinformation.googleapis.com/v1/locations/XXXXX?readMask=storeCode,metadata,profile,serviceArea,labels,adWordsLocationExtensions
instead of XXXXX, write your locationId
you can write different readMask fields, The possible fields for readMask are:
play with different fields to check if you have your desired one or not readMask="storeCode,regularHours,name,languageCode,title,phoneNumbers,categories,storefrontAddress,websiteUri,regularHours,specialHours,serviceArea,labels,adWordsLocationExtensions,latlng,openInfo,metadata,profile,relationshipData,moreHours";
If above does not help you, in the link below I see that all metadata attribute of a location might be:
Click [here] (https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.Metadata)

Receive creative name for SPONSORED_VIDEO & SPONSORED_INMAILS from LinkedIn API

Just trying to fetch the creativename for creativeTypes = SPONSORED_INMAILS AND SPONSORED_VIDEO out of the LinkedIn API but I'm only able to receive creative names of SPONSORED_STATUS_UPDATE type.
In the doc I can only read fetching data for SPONSORED_STATUS_UPDATE by using the projection variable.
https://learn.microsoft.com/en-us/linkedin/marketing/integrations/ads/account-structure/create-and-manage-creatives#sponsoredvideocreativevariables
Does anyone have an idea how to get the creativename (subject) for SPONSORED_INMAILS AND SPONSORED_VIDEO?
I know It's a little bit late but with this endpoint, you can retrieve info on a video add
https://api.linkedin.com/v2/adDirectSponsoredContents/{{videoAddReffrence Urn}}
You can find the video Add reference Urn under the endpoint
https://api.linkedin.com/v2/adCreativesV2/{{add Id}}
under the key 'reference'

Get Source and Medium from ga.js

I have a newsletter page on my website which I'd like to also use to capture some additional information about the user using Google Analytics.
Using the getAll() method from ga.js I can get the referrer URL (if any), however I cannot see the medium or source data. Is this possible to retrieve using their ga.js library?
Retrieve specific tracker from the list of trackers you obtained.
Use the following to access the fields source and medium.
tracker.get('campaignSource') and tracker.get('campaignMedium')
Additional help from below links.
Access data from ga object:
https://developers.google.com/analytics/devguides/collection/analyticsjs/accessing-trackers
Field reference:
https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference
This is not possible with ga.js.
However, you can use custom JavaScript to deduce the same information.
If you only want this capability, then I suggest you have a look at the library I wrote: https://github.com/ilkkapeltola/visitdata
Once the library is included, you can run visitData.get(), which returns an object with exactly the data you need.
If you are using google analytics core reporting api try this
'metrics': 'ga:sessions ,ga:pageviews',
'dimensions' : 'ga:source,ga:medium'

Linkedin - Get companies updates queries

I'm trying to create an app to read company updates, but I have a few queries. Please help...
I'm using LinkedIn api via Oauth authentication in R
Is there anyway to fetch more updates than the restriction (only allow fetch up to 250 updates or updates in the last 20 days whichever comes first) ?
Example code
https://api.linkedin.com/v1/companies/270126/updates?event-type=status-update&count=100&start=0 &oauth2_access_token={access_token}
Once I got the updateKey, I'm trying to fetch the comments and likes but it's returning NO return
Example code
https://api.linkedin.com/v1/companies/270126/updates/key=UPDATE-c270126-5951438751136768000/update-comments?event-type=status-update&oauth2_access_token={access_token}
https://api.linkedin.com/v1/companies/270126/updates/key=UPDATE-c270126-5951438751136768000/likes?event-type=status-update&oauth2_access_token={access_token}
From the company status-update, it's returning FALSE for is-commentable and is-likable? Is that why there are no result from Query 2. If so, is there anyway to change that setting?
'is-commentable' false '/is-commentable'
'is-likable' false '/is-likable'
Any help would be greatly appreciated!!!!
Linkedin developer - Reading Company Shares link
https://developer.linkedin.com/reading-company-shares
Try using the Share and Social Stream end point instead of the Companies end point like this:
https://api.linkedin.com/v1/people/~/network/updates/key=UPDATE-c270126-5951438751136768000/update-comments?oauth2_access_token={access_token}
The documentation is here:
https://developer.linkedin.com/documents/commenting-reading-comments-and-likes-network-updates
Also you can test different Linkedin API calls here:
https://apigee.com/console/linkedin

Resources