readMask value to get the display names form new GMB API - google-my-business-api

I am running this line of code:
location_list = self.service_mbbi_v1.accounts().locations().list(parent=account_name,readMask='name').execute()
And I get the list of the location IDs but I don't manage to get the Location display name, the display name, not just the ID. I wrote google and told them about my issue and they told me they are looking into it but it has been 2 weeks and no response yet. So just wanted o see if someone else had the same issue and if they fpund a solution or a workaround.
The documentation provides only an example, not a list of possible values:
https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations/list
And even when I try the example value of the readMask flag I get an error:
[{'#type': 'type.googleapis.com/google.rpc.BadRequest', 'fieldViolations': [{'field': 'read_mask', 'description': 'Invalid field mask provided'}]}]">
I found this similar question:
Google Business Profile API readMask
The example they provide work for me but I still can't get the display name value.
I thought of using the google place ID I get from the metadata response and see if I can use another API to find the name but it feels they should be a proper 'readMask' string vale for the display name here and it is not 'displayName'..
Has anyone a hint of what can I do?
Thanks a lot

If you are trying to get the business name data, your readMask should be 'title'.

Related

Google Places Text Search API Issue

Requirement:
Need to search business through the address and in the result list Business name should return.
Problem:
When we search by only address of the business ( without business name ), then in the result list it returns only the address or place and does not return business name.
To get the business name in the result list, I had passed "Opennow = true" in the request, which works well and return business name in the results set whenever we search through only address.
But the challenge here is that, the Opennow = true returns only those businesses which opening hours are open at the search time, out of the opening hours it returns blank data.
I need the list of businesses with their name whenever we search through address only regardless of opening hours open or closed.
This is the API I am using to get text search data:
"https://maps.googleapis.com/maps/api/place/textsearch/json?query=&opennow=true&types=establishment&region=us&key="
I found resolution for your query in the google documentation:
https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-hotelsearch
Could you try the above, surely, it requires modifications.
Hope that will solve your problem
Thanks

youtube analyticsService Report parameters

I am authenticating with google to try and get youtube analytics my problem is that i don't know how to filled you the parameters when quering youtube
here i am making a new service: and then try to query it
I am not sure what to put in the "ids" parameter or where to find it?
What do I put there?
_analyticService = new YoutubeAnalyticsService(_authenticator = CreateAuthenticator());
...
_analyticService.Reports.Query("ids", "2013-01-01", "2013-02-02", "views").Fetch();
The ids parameter is the an expression with the id of your channel. If you go to http://www.youtube.com/analytics and click on the title with your own channel name, you get a link like http://www.youtube.com/channel/UCYHMS8hN8s49F93iJuEgG6w The last part is the id of your channel. You have to use this as the ids parameter in an expression like "channel==UCYHMS8hN8s49F93iJuEgG6w". This is to query in the context of your own channel. This is needed as you might have access to several channels.
I can query views for one of my videos by: https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3DUCYHMS8hN8s49F93iJuEgG6w&start-date=2013-01-01&end-date=2013-02-02&metrics=views&dimensions=day&filters=video%3D%3D_iwmv6644dA&sort=day&key={YOUR_API_KEY}
Try to use the API explorer at the bottom of this page, there are some text explaining the different parameters there as well. https://developers.google.com/youtube/analytics/v1/
Hope it goes well!

how do you get multiple Twitter names using api querystring

HI,how do i get multiple twitter name using API querystring,exmaple i need to populate related with the name of 'john'.how can i do that here i have one example below 'http://search.twitter.com/search.atom?q=from%3Ajohn' by this example we can see only particular user name only but i want related name.Kindly let me know ASAP.
You can use the OR operator...
http://search.twitter.com/search.atom?q=from%3ADWRoelands+OR+from%3AJohn

how do i get multiple twitter name using API querystring?

HI,how do i get multiple twitter name using API querystring,exmaple i need to populate related with the name of 'john'.how can i do that here i have one example below
'http://search.twitter.com/search.atom?q=from%3Ajohn' by this example we can see only particular user name only but i want related name.Kindly let me know ASAP.
You can use the OR operator...
http://search.twitter.com/search.atom?q=from%3ADWRoelands+OR+from%3AJohn

Howto I get the user domain\username and Display name From SharePoint People Picker InternalId?

I have been trying to user sharepoint designer to retrieve the user's full name and even the domain\username from the people pucker field but the problem is I tend to get numbers. It looks like the intetrnal Id. In my case I am getting 14 instead of domain\username from the list form's field.
Any idea on where I can get the dmain\username or even better the full name?
Thanks !!
I am using SharePoint Designer and Windows Sharepoint Services 3/SharePoint 2007.
Update :
I have managed to get the domain\username now. I just had to change the people picker's show field to ID. However now I am getting a weird prefix on my domain\username. I am getting this -1;#domain\username instead of just domain\username. Anybody know how I can overcome this?
Thanks !!
I don't know how to avoid getting the information in that format, but I know how to get rid of the "1;#" part.
Assuming the variable "theName" contains "1;#domain\username", then you can do:
Dim poundSignIndex As Integer = theName.IndexOf("#") + 1
theName = theName.Substring(poundSignIndex)
That will remove everything before the "domain\username" part of the string.
Leon.

Resources