Telegram bot that shows the nearest transport departure from your favourite station. You can find the bot itself by the nickname: @nextTrainLondonBot or by following the link:
https://t.me/nextTrainLondonBot
The bot is the demonstration of bot for my presentation "Don't talk to me. Talk to my bot", so it has many comments to help developers get familiar with Telegram bots. Please find the step-by-step tutorial how to create your own bot, here is the link:
đź“– Wiki: how to start with bot development
You can store your search as "bookmarks". We use BoltDB storage for that.
The bot uses TFL Api. Here are main requests that we perform on the request.
Search station by name. We call this endpoint when user searches a station and a popup window sith suggestions appears.
The documentation is here. For example, find all stations matching, say, "Liverp" we call:
https://api.tfl.gov.uk/StopPoint/Search?query=Liverp
Find a route between two stations
For each station we use icsId unique identifier. Here is the example of http query for the route between two stations (full documentation is here):