According to Uber's API docs to create a Ride Request I need to specify at minimum:
Start Location
End Location
Fare ID
I would like to add intermeidary locations between Start and End Location. Is it possible to add it programmatically?
Unfortunately, there is not a way to add multiple locations. The only way would be to set the end location and then use the PATCH /requests/current endpoint to update the destinations during the trip.
Related
is there a way to request how many tiles were already requested this month for a given API key?
Or would I need a backend, to keep track?
On this side, I can see the requested tiles: https://account.mapbox.com/
But it only updates daily, not live.
Any help is appreciated.
There is a transformRequest option you can use when you instantiate the map. You could add code to it to trigger a counter somewhere else whenever a tile is requested.
See options.transformRequest here:
https://docs.mapbox.com/mapbox-gl-js/api/map/#map
Here is an example of how it is used: How to specify Authorization Header for a source in mapbox-gl-js?
So I am using below API to fetch details of a meeting
https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#tag/Dashboards/operation/dashboardMeetingDetail
In the response of above API I can see a field custom_keys, which is some sort of identifier fo a particular meeting.
Any idea how to set these custom_keys when creating a meeting?
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
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.
I am trying to publish a post on the user news feed with the users current location.
According to the documentation on 'Post' I need to add the location information to the 'place' attribute.
But is seems it is associated with an already defined 'place'. My requirement is to just push the lat / long info to dsiplay the city. Is this possible with the current graph API ?
Currently there is no public API to push a new place info, you can only pass existing "places".
You could begin by finding the name of the current city and country by inspecting some nearby places:
/search?type=place¢er=LAT,LONG
Then you can try to find the Place ID of that city:
/search?type=place¢er=LAT,LONG&q=CITY, COUNTRY&limit=1
(You may have to add the state field for countries that use that division.)
Now you have a Place ID to use for your post.