In transit rest API how can I find bus number. Response already included direction name but bus number is missing. Please help me to get bus number?
You can get a particular station name by requesting below request provided that you have to pass stationId which you can get from here
https://transit.api.here.com/v3/board.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&lang=en
&stnId=703280098
&time=2019-06-24T07%3A30%3A00
also please see the documentation for more reference.
Hope this helps.
Just a Hunch Try adding all the bus numbers to a list and redirecting them according to the station no or time of arrival!
Related
I currently have a POC working that retrieves places information using the Places HERE api by passing Lat and Long values. Our addresses are being converted to lat and long before the api is called and we fear we might be losing precision in the process. Instead of feeding the API the coordinates, is there a way to send the actual address and get the address information back? Business name, type, etc?
res = requests.get('https://places.cit.api.here.com/places/v1/discover/here?app_id=<>&app_code=<>&at='+str(lat)+','+str(long))
Based on what I see in the API docs (https://developer.here.com/documentation/places/dev_guide/topics_api/resource-search.html) the answer is no. You can see more detail here as well: https://developer.here.com/documentation/places/dev_guide/topics/location-contexts.html. Is there a particular example of where you think geocoding is returning bad results?
Use Geocoder API to get coordinates for address and then use these coordinates to make a request to Places API.
With this GET request I can show information about one city
geocoder.api.here.com/6.2/geocode.json?level=city&mode=retrieveAreas&app_id=APP_ID&app_code=APP_CODE&LocationId=LOCATION_ID
But how can I make a single request to GET multiples cities by multiples LocationId's?
Any help is appreciated
Currently HERE API does not support passing array into location Id. You have to make the single request at a time but we can recommend this to our team as enhancement feature request.
https://geocoder.ls.hereapi.com/6.2/geocode.json
?locationid=NT_5mGkj3z90Fbj4abzMbUE4C_xA
&jsonattributes=1
&gen=9
&apiKey={YOUR_API_KEY}
Hope this helps!
I'm currently requesting scopes w_company_admin, r_basicprofile, and rw_organization.
I already posted a similar question here, but I got no support so I'm trying a different approach.
I found another endpoint that should get me the organization name. I used this endpoint to get ID of organizations:
https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&start=0&count=100&fields=organizationalTarget&oauth2_access_token='.$oauth_token;
Then when I extract the ID from urn leaving me with just ID number I use that in this request
https://api.linkedin.com/v2/organizations/'.$company_id.'?projection=(elements*(entity~(vanityName)))&oauth2_access_token='.$oauth_token;
The problem is that this request is returning 200 status with the output being "{}".
I don't understand why no data would be returned? It seems like the API request is failing considering the first request worked successfully.
I can replicate the problem, you should use a different projection.
Use this:
projection=(vanityName)
Instead of this:
projection=(elements*(entity~(vanityName)))
Probably the doc here seems misleading about the usage of the decorator in this case.
Hope this help
Reposted an answer to your original question:
I found the answer on this page: https://learn.microsoft.com/en-us/linkedin/shared/references/migrations/permissions-resources-mapping
"rw_organization_admin" is the missing scope.
I am using a HERE API call to request traffic incident data from a particular start time. Whenever I include the "type" key and specify "Accident" as the value, no response is returned. However, switching the value to "Construction" does provide a response.
Does anyone have information on how to make the API call return accident data specifically?
Here is the exact call I am using:
https://traffic.api.here.com/traffic/6.3/incidents.json?app_id={{app_id}}&app_code={{app_code}}&startTime=2017-01-01T00:00:00-05:00&type=Accident&bbox=52.5233,13.4035;52.5181,13.4159
There is no data returned as there are no “Accident” type incidents in that location. This can be seen when skipping the “type” parameter:
https://traffic.api.here.com/traffic/6.3/incidents.xml?app_id=APP_ID&app_code=APP_CODE&startTime=2017-01-01T00:00:00-05:00&bbox=52.5233,13.4035;52.5181,13.4159
Traffic Data is dynamic data. Accident can be located somewhere and disappear in a matter of minutes. We recommend to use wego.here.com to locate an accident, or Bing maps (they are all using our services and traffic data).
We were able to find one in Germany right now (should be there until 13:34 German time):
https://traffic.api.here.com/traffic/6.3/incidents.xml?app_id=app_id&app_code=app_code&startTime=2017-01-01T00:00:00-05:00&prox=51.52427,11.85887,15&type=Accident
Hope this helps! Happy Coding!
I have searched the questions here and gone through a fair amount of the API. I have not found reference to requesting historic route data. My questions is this; Does the Here api support historical route data. An example request would be that I seek the mileage from point a to point b 365 days ago, when perhaps a key route obstruction existed such as a bridge was out or a road was closed for construction that resulted in more miles during that historic period.
I would like to answer this in two parts
Can a route be calculated for a past date ?
Yes, you can. You need to request a Time Aware Route like below. You can read more about it in the developer site.
`
GET https://route.api.here.com/routing/7.2/calculateroute.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&mode=fastest;car;
&waypoint0=geo!37.743385,-122.422835
&waypoint1=geo!37.743878,-122.423686
&departure=2014-03-12T10:00:00
&routeattributes=sh,bb,g
`
Will the map used for the query depend on the departure date ?
No, Here API always uses the current version of the map available unless you specify explicitly the map version. But you can specify only till previous two releases.
So for your question, you wont be able to get the map data for a past year even using map version. But what you can do, is explicitly avoid the bridge or road newly constructed so that the api doesn't suggest that route. You can do this through Custom Route Extension API like below example.
GET http://cre.api.here.com/2/overlays/upload.json
?map_name=OVERLAYBLOCKROAD
&overlay_spec=[{"op":"override","shape":[[50.10765,8.68774],[50.10914,8.68771]],"layer":"LINK_ATTRIBUTE_FCN","data":{"VEHICLE_TYPES":"0"}}]
&storage=readonly
&app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}