Google fit rest API sync data delay? - google-fit

I'm trying to get data about heart rate from google fit with rest api.
The last record which I can get is always from 1 day ago.
Is there any way to get the newest record about heart rate from the current day?

Related

Why do calls to getDetails about a place in Google Maps Places Library keep returning QUERY_OVER_LIMIT error?

I have a location and I am placing a call to nearbySearch() of the Places library through Google Maps Javascript API to get restaurants within 1000 meters of my location. I then loop through the first 20 restaurants and make a call to getDetails() so that I can pull out the website of each restaurant. This works fine until I get to about the 10th restaurant, then I start to get QUERY_OVER_LIMIT status sent back from the getDetails call.
I have slowed down my calls to once every 300ms, but I still get the QUERY_OVER_LIMIT error. Based on what I've read, a call to the Places library every 300ms should be well within the limit. When I read documentation, it states that the per second limit for the Places API (which supposedly also applies to the Places Library of the Maps Javascript API) is 100 requests per second. When I log into my API dashboard, it tells me my per minute limit for the Places API is 6000 per minute. At one request every 300ms I am nowhere near my limits, so I'm at a loss to understand why I keep getting this error. Naturally I could slow it down much more, but this degrades the user experience and since the rate seems unpredictable, it's hard to settle on a rate that I know will produce consistent results.
Places API Requests per Second
Places API Request per Minute
Places Library [what you are using when you make getDetails() requests in Javascript] and Places API [the product your screenshots are talking about] are two different things with two different quotas.
When you use Places Library, Google rate limits you which is what you are seeing.
https://developers.google.com/maps/documentation/javascript/places#UsageLimits
To be able to make more batch requests like you want, use Places API to get the Details for all of the places (which will get pricey pretty quick).
https://developers.google.com/maps/documentation/places/web-service/details
https://developers.google.com/maps/billing/gmp-billing#places-details

google maps real time traffic

I'm using Google Maps web-services -> Distance Matrix API.
My goal is getting driving time between two or more fixed locations, but considering real-time traffic.
I have tried a couple of parameters combinations, but I always get a static trip duration on the replied JSON.
Do you have a recommendation regarding building a request for getting back tip duration considering real-time traffic?
I have tried the following request on a browser, in order to get a JSON reply:
http://maps.googleapis.com/maps/api/distancematrix/json?&origins=Guadalajara&destinations=Chapala&mode=driving&departure_time=now
However, the parameter "duration" is always the same:
duration
text "54 mins"
I would like to get the trip duration considering real time traffic as part of the replied JSON, like when using Google Maps on web:
https://www.google.com/maps/dir/Guadalajara,+Jal./Chapala,+Jal./#20.4809265,-103.3652921,11z/data=!3m1!4b1!4m14!4m13!1m5!1m1!1s0x8428b18cb52fd39b:0xd63d9302bf865750!2m2!1d-103.3496092!2d20.6596988!1m5!1m1!1s0x842f40b1771f4cb7:0x73c1721b67d87f53!2m2!1d-103.1846016!2d20.3051576!3e0

GPS navigation - Real time navigation using google maps in Ionic 1

I have been working in this project for a month and i have made it almost complete except the last functionality, which is real time navigation from current location to destination in ionic framework. I have google a lot, saw links of stack overflow but all I get is there is no way to get real time location legally provided by google in their API. So In Ionic framework, Currently I am getting current lat and long and destination lat and long using service API.
Is this possible we use the same direction service response, and plot some pinpoints in the route between the current location and destination, and after some fixed interval check user location.
Will it behave at least near to that functionality which i am trying to make ? Or will it be legal to use the response from the service API as a base point to achieve this feature?

Google API get bus station available lines

I'm trying to get a list of the nearest bus stops around a certain location along with which buses stop there. I can easily get nearby bus stops using the Google Places API but the response doesn't include which buses stop there. I want to extract the data that is visible when you click any bus stop (which can be seen below).
Is there a way for me to extract (from the above example the numbers 52 and 452) using any Google API or even a 3rd party API?

Google Maps Dircetions API - Arrival time?

I use the Google Directions API for calculating the needed time between 2 places. The API gives me an option departure_time, where I can pass the timestamp of the departure time (or "now"). Then the answer is the duration_in_traffic. This is working really great.
But I need to show the amount of time that the user needs with his car, when he want to be at his target at a specific time.
E.g. the user wants to be in Dortmund at 8pm (20:00). So I need to show him when he should start driving to arrive in time at his desired goal. The API-documentation says, that there is a parameter arrival_time, which does exactly what I need. Unfortunately they say it does only work for public-transport.
But Google maps itself offers the desired functionallity even for cars! As you can see in the screenshot: I said that I want to be in dortmund at 20:00 and google-maps says, I should start driving 'arround 18:30'
So how I can I achieve this with my app? Do I need another API or do I need to pass other parameters?
Here is my current API call:
https://maps.googleapis.com/maps/api/directions/json?origin=Bielefeld&destination=Dortmund&arrival_time=1460836800&key=AIzaxxxxxxxxxxxxxxxxxxxxxxxxxxx
best regards
Michael