uAgent London Transport Examples
This repository contains examples of london transport journey planner integrations using three agents: tfl_agent and user_agent.
-
user_agent: This agent takes from and to location request as details from user, and responds with all possible routes with detailed plan. -
tfl_agent: This agent takes from and to location from user, fetches the post code using UK PostCode API and sends request to tfl request link with journey endpoint. https://api.tfl.gov.uk/Journey/JourneyResults/from_loc/to/to_loc. This sends all possible routes to the user agent.
Getting Started ๐
To use these agents, follow the steps below:
Step 1: Obtain API Keys ๐
Before running the agents, you need to obtain the required API keys:
UK_POSTCODE_API
- Visit the RapidAPI website: https://rapidapi.com/search/uk%2Bpostcodes
- If you don't have an account, create one by signing up.
- Once you are logged in, click on test endpoint and register for API on free-tier.
- Once done you will see X-RapidAPI-Key in header parameter.
Step 2: Set API Keys and address in agent scripts
- Fill in the API Keys in the
tfl_agentscripts. - Replace the london_transport agent address in user agent's script.
Step 3: Run Project
To run the project and its agents:
cd src
python main.py
Now you have the agents up and running to perform london transport journey planner integrations using the provided APIs. Happy integrating! ๐