Google My Business Profile APIs Location Patch request has the different structure then uploading via UI - oracle-adf

Google My business when we update an location's hours the csv has the data in the format via UI
For example:- storecode | Sunday hours| Monday hours | Tuesday hours
UI format
and the API accepts the format which is different then UI
API format
For example:-
can anyone tell me there is way to upload (UI format)csv into the endpoint
https://mybusinessbusinessinformation.googleapis.com/v1/locations/locationId?updateMask=regularHours&validateOnly=true

For patching location data, the GBP API currently only accepts JSON.
In the case of the opening hours, the TimePeriod format you found already is the only way (https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations#timeperiod).

Related

Access angularjs i18n date/time and currency formatting in application

I have an angular project with multiple locale config files--e.g. en-us.json, es-es.json, etc.
I have a need within my application to extract the date/time and number format data for the currently active locale. The extracted formats are to be massaged and passed into an external service that generates a report.
The basic flow would be:
User views a result page
User clicks button to generate report
Client app uses active locale to look up date/time and number formats defined in xx-xx.json files
format data sent to server, which massages the data and sends it to an external report generation service
So, what is the best way to access the formats set in the angular xx-xx.json files?
So it looks like the piece I was missing was the use of $locale
e.g.,
this.$locale.DATETIME_FORMATS.formatDay

Google Data Studio send API request

I have my own community connector built which is pulling data through API. Everything works as it should, as I am getting data into the report.
Now I want to be able to query the API from the report, using a dedicated field/filter. What I mean is having the option to write a string and request API for results including that string.
What I have done so far is I've used the request.configParams.field_name parameter to pass request data from Google Data Studio back to my data source but this means reloading the data source into the report every time I change the value.
Is there another way to pass custom request data from Google Data Studio to my connector API query?
For Community Connectors, it is not possible to push down arbitrary filters for report viewers at the moment (other than date filters).

Gmail API not returning correct emails compared to Gmail web UI for date queries

The results differ between the Gmail api and Gmail web ui when using the standard query format as described here - https://support.google.com/mail/answer/7190.
The issue is specifically for the parameters after/before and newer/older. For example the following Gmail api query "after:2015/11/19 before:2015/11/20" returns different results compared with running that same query in the Gmail web ui. The web ui looks correct whereas the api returns emails from the next day (20th). Possibly a timezone conversation problem?
Checking past questions I see something similiar here how to use GMAIL API query filter for datetime (the server processes the queries as PST time). If this is the case it might be worth updating the docs or think about a possible solution.
Steps to reproduce the problem.
Have some mail in a gmail account covering the dates below. Inc days after and before.
Run after:2015/11/19 before:2015/11/20 in a Gmail web ui.
Query the Gmail api with "after:2015/11/19 before:2015/11/20" for the q parameter using https://developers.google.com/gmail/api/v1/reference/users/messages/list
Compare results. (I had differences when running these steps against a UK Gmail account)
Should only see emails from the 19th, but I see emails dated the 19th AND 20th when using the api. The web ui works as expected and only returns emails dated the 19th.
FYI: I was also using other query parameters such as "from: example#example.com" in conjuction with before/after or newer/older params. I wanted to simplify the bug report / question.
Also: The api queries I was making with a node module called node-gmail-api. Checking the code the endpoint being used is 'messages' code:
body: 'GET ' + api + '/gmail/v1/users/me/messages/' + m.id + fields + '\n'
Is the problem that 'messages' and not 'messages/list' endpoint is being called? As per answer to this question? - Why does search in gmail API return different result than search in gmail website?
Is this a bug / feature? Is there a workaround such as using epoch ms. (also not in the docs as I can see)
Thanks
You can list the messages with second accuracy if you would like:
q = after:<start_of_day_in_seconds> AND before:<end_of_day_in_seconds>
So e.g. from Wed, 25 Nov 2015 00:00:00 GMT to Wed, 25 Nov 2015 23:59:59 GMT would be:
q = after:1448409600 AND before:1448495999

USPS Rate API Standard Post get Expected Delivery Date

I searched to see how i can get the expected delivery date for USPS Standard Post.
I have it when i use <ShipDate...> tag, for all other services i receive <CommitmentDate> tag, but for Standard post this tag is missing. Their documentation doesn't tell anything about how to get this date using Rate API. Is it possible, or i have to make another request to different API to get this date?
On their online calculator they return Expected Delivery Day for Standard post service, so there is a way to get it, but how?
Thanks.
You need to access the "Domestic Mail Services Standards" API.
Specifically, you need to send a "StandardBRequest" web services request for the origin and destination zip codes, and will receive the number of in-transit days as a response.

Google Maps Local Services Search

I am creating a VB.NET WPF application that requires a user to nominate services local to the area they are in (such as the closest hospital, fire station, etc). Using the maps.google.com.au web site I can return the results that I am seeking, and I have stumbled across an AJAX based API that too returns results that I am after, however this is in a format that I am unfamiliar with (I think it is JSON).
Using the following URI, I am able to get a file that contains results for all hospitals local to Adelaide, South Australia, can anyone advise if this is JSON and if they could provide any sites or information on how I can parse this data in VB.NET 3.5.
http://ajax.googleapis.com/ajax/services/search/local?v=1.0&q=public--hospitals%20adelaide%20sa%20australia
If there is any suggesstions on better Google Maps API's that can achieve this (I would love XML format as I am more familar with XML then JSON) your suggesstions will be greatly appreciated.
Thanks,
Matt
You can use the json.net library to parse the JSON data

Resources