Which waypoints are returned by API and in what order? - uber-api

Which waypoints are returned by API? I need to know if it will include only waypoints between moment where passenger is picked up and dropped off, or will it also include waypoints before passenger is picked up?
Also, are the waypoints returned in correct order? Is there plans to add estimated ETA's to each waypoint?

The waypoints include any upcoming pickup or dropoff stops scheduled before your user’s final destination. We don't include waypoints about the other POOL rider after your user's destination, since from your user's perspective, the trip is over.
As the documentation states, the waypoint indicates whether it is a pickup or dropoff type and which rider it is associated with. The waypoints themselves are ordered and update as the trip progresses.
So, consider a situation where your user gets picked up at Home and dropped off at Gym, and is matched with another rider will be picked up in the middle of your user's trip at Downtown then dropped off Somewhere after your user finishes their trip.
The waypoints before your user gets picked up would show:
[Home, Downtown, Gym]
Once your user is picked up, the waypoints would update to show:
[Downtown, Gym]
Since the Home waypoint has passed. Note we never return Somewhere since that is after your user's dropoff.

You see just the waypoints that affect your ETA, i.e. on the way to your pickup and on the way to your dropoff.
Specifically: "We show waypoints after your pickup but before your dropoff. Nothing beyond that (for privacy reasons)."
No further plans or changes here at the moment. Let us know if you have any different experience when you test.

Related

Flutter & google maps how to save users trajectory

I would like to save users' trajectory when they are on a vehicle and save them as a "history of trips" for other calculations Like distance, time, etc..
When I used the directions API, it only gave me the shortest route between the start and the destination, but I need the exact route that the user took
Exactly like Google TimeLine: https://timeline.google.com/maps/timeline

Deprecation notice: Obsolete Place IDs

I am setting up the plugin WP Google Review Slider, never thought it was so difficult!
I am getting error:
Deprecation notice: Obsolete Place IDs
and I cannot find where to refresh or update the place ID.
In WP dashword within the plugin I added the API key and I have to add as well the place id, when I do I gett this error message:
Google API Error: Wrong Key or Maps API not added. Due to recent changes by Google you must now add the Maps API to your existing API key in order to use the Location Lookup feature of the Google Places Widget.
View documentation here
and when I go to https://developers.google.com/maps/documentation/places/web-service/place-id, in order to get the place id I get this one: "Deprecation notice: Obsolete Place IDs" and there is no way who to find how to solve it.
Refresh the place id via:
GET https://maps.googleapis.com/maps/api/place/details/output?place_id=<your_place_id>?fields=place_id
From the docs:
We recommend refreshing place IDs if they are more than 12 months old. You can refresh Place IDs free of charge, by making a Place Details request, specifying only the place_id field in the fields parameter. This will trigger the Places Details - ID Refresh SKU. However, this request might also return NOT_FOUND status code. One strategy is to store the original request that returned each place ID. If a place ID becomes invalid, you can re-issue that request to get fresh results. These results may or may not include the original place. The request is chargeable.
Strategy
Call the Place details API to check if the place id is valid
https://maps.googleapis.com/maps/api/place/details/json?place_id=ChIJDx2VxLa1j4AR--kx601BUbY&fields=place_id&key=AIzaSyBiTgTvug0-W1RSaAZOT7cI4NgwzaRHVHc
(change "fields=place_id" to "field=" to see all fields)
It can result in following
Current google place id
Updated google place id
INVALID_REQUEST - (status code indicates that the specified place ID
is not valid)
NOT_FOUND - (status code indicates that the specified place ID is
obsolete. Id is obsolete if a business closes or moves to a new
location) (in this case lat long may not be useful if a business
moves to another location)
Handling the above conditions
Do not do anything (in the future may check also the last time data
is updated in DB to avoid frequent API calls)
Update the google place id inside DB and continue with the open map
Request the google details API with lat long to get a valid google
place id
Request the google details API with a place name to get a valid
google place id

Uber deeplink call not accepting pickup and dropoff parameters

My method for launching the Uber from within my app is working. It takes me to the "setPickup" page, it shows the start/pickup address but its not showing the dropoff/destination even though I am providing it.
Because my GPS is on, though, I don't know if the pickup is correct because its accepting my pickup parameters being passed to it or if its simply using my device's GPS.
Here is my call to the Uber app:
uber://?action=setPickup&client_id=MY_CLIENT_ID&pickup[latitude]=27.875107pickup[longitude]=-82.489036&dropoff[latitude]=27.9425974&dropoff[longitude]=-82.45189249999999&product_id=37a94557-682f-4562-ba62-2448f80d3ddd
I am able to select different types of uber via the passed parameters, UberX, UberSelect, etc...thus it all appears to be working except for the dropoff portion. The uber app shows the pickup, but just says "Destination" looking for an address to be entered.
NEW ISSUE:
Well, its almost working, I am testing this across New York city as NY has more Uber pickup services than any other city (I am aware of). When I get the products info I am using that to pass to the deeplink. As best as I can tell I am specifically calling for uberX yet its defaulting to uberPool.
I tested further...it isn't uberX specific. Its happening ONLY on the first uber app launch, no matter what product is selected - every time it defaults to uberPool. If I back out of uberApp back into my own, and click uberX or any other uber Service - it then takes me to the appropriate service screen.
If I close my app, restart and load uber services - the issue repeats. First time default to uberPool, then all subsequent ride selections open the uber app and take me to the correct service that was selected from within my app.
Whats up this...please don't tell me its an uber feature? :-(
0:
{capacity: 2, product_id: "929fcc19-8cb4-4007-a54f-3ab34473700f", price_details: null,…}
capacity:2
description:"Share the ride, share the cost"
display_name:"uberPOOL"
image:"http://d1a3f4spazzrp4.cloudfront.net/car-types/mono/mono-uberpool.png"
price_details:null
product_id:"929fcc19-8cb4-4007-a54f-3ab34473700f"
shared:true
short_description:"uberPOOL"
1:
{capacity: 4, product_id: "b8e5c464-5de2-4539-a35a-986d6e58f186",…}
capacity:4
description:"The low cost Uber"
display_name:"uberX"
image:"http://d1a3f4spazzrp4.cloudfront.net/car-types/mono/mono-uberx.png"
price_details:{service_fees: [], cost_per_minute: 0.35, distance_unit: "mile", minimum: 8, cost_per_distance: 1.75,…}
product_id:"b8e5c464-5de2-4539-a35a-986d6e58f186"
shared:false
short_description:"uberX"
And my deeplink call:
uber://?action=setPickup&client_id=MY_CLINET_ID&product_id=b8e5c464-5de2-4539-a35a-986d6e58f186&pickup[latitude]=40.759078&pickup[longitude]=-73.986201&pickup[formattted_address]=205%20W%2046th%20St,%20New%20York,%20NY%2010036,%20USA&pickup[nickname]=New%20York%20Marriott%20Marquis&dropoff[latitude]=40.7118011&dropoff[longitude]=-74.01311959999998&dropoff[formatted_address]=World%20Trade%20Center,%20New%20York,%20NY,%20USA&dropoff[nickname]=World%20Trade%20Center
In order to set a dropoff destination, you must also specify either a dropoff nickname or formatted address. The parameters are dropoff[nickname] and dropoff[formatted_address], respectively.
See this Github issue for some more context: https://github.com/uber/rides-ios-sdk/issues/1

How to get the actual drop location(not the destination) of a Uber Ride via API, after the ride completes?

I can see the my actual drop location on the receipts page on riders.uber.com, but do not see that data in requests/{request_id}/receipt/ end point of the API. Is there an alternative to get this data ?
I see that a GET on requests/{request_id}/ gives the actual location of the a ride, but does this point also gives the same data on ride completion/cancellation ? On sandbox-api, on completion of ride, I get location as null, on a GET requests/{request_id}/ call
The Uber API doesn't expose this information. It provides the destination of a trip in the request details, but it does not update the destination based on the actual drop-off location.
As pointed out in the comments, ONE partial alternative for this use case might be to use the request details array of waypoints. However, it is only available for shared rides like UberPOOL.

Missing 'available_countries' information on some track API requests

Some of the API requests to get track details are missing the array of available_countries in which the track can be played.
For instance this Pink Floyd track:
http://api.deezer.com/track/89569653
But when testing in the API console the available_countries are present for this track ID.
It only seems to happen for some tracks though, for instance the Daft Punk API example does have the available_countries data:
http://api.deezer.com/track/3135556
Is it an issue with the API?
The node "available_countries" is there but empty, so it just means that the track is not available in any country, it is not an issue. If you check directly in our website www.deezer.com/track/89569653, you will see that the track is not available.