Detta inlägg är gammalt och kan innehålla inaktuell information.

Which API to use for Skjutsgruppen

Hi,

I see that there are number of APIs provided in the https://www.trafiklab.se/ and because of language, it's a bit harder to follow the documentation and also the results from the API. I am trying to use https://api.resrobot.se/v2/trip? API to search trips on a given date/time. I could see the results in bothering JSON and XML, though JSON is a bit hard to follow for me.
What we would like to show in the search results is the link to ResRobot with the bus / train number (with minimal info) when the user is searching for some trips (from one point to another) on a particular date / time.

https://pastebin.com/d5JzdScD i see 9 results. Is it ok to show just the first train or bus number (with date/time) and then link to resrobot from our application? To start with, we want to provide minimal info on public transport in our app but later redirect to resrobot for more detailed info so that users can take informed decision in their movements.

For example:
for this trip from https://pastebin.com/d5JzdScD

```
<Trip idx="0" ctxRecon="T$A=1@O=Rosenlund (Stockholm kn)@L=740046007@a ...
..
<Leg type="JNY" idx="0" name="Länstrafik - Buss 3" transportNumber="3" transportCategory="BLT" reachable="true" direction="Karolinska sjukhuset norra (Solna kn)">
...
```

We would like to show the following info

```
Länstrafik - Buss 3
Dec 21, 11:39AM
link to resrobot from here.
```

But i can't see to find info on linking with resrobot. I don't see any link on resrobot that takes to particular search results. Is it possible to direct users to the search page or results page from external links?

Do you have any other suggestions in terms of using the data?

Many thanks.
Anjesh



Kommentarer

Kommentera eller skriv ett nytt inlägg

Ditt namn och inlägg kan ses av alla. Din e-post visas aldrig publikt.