This is a .NET wrapper for the Transport for London API.
Add package using dotnet add package TfLApi.
Then add the assembly reference TfL and start using a TfLClient, like below:
using TfL;
using TfL.Entities;
TfLClient client = new();
TfLRoutes[] lines = await client.Line.GetLinesByModeAsync("tube");
// List all lines on the Underground
foreach (TfLRoutes line in lines)
{
Console.WriteLine(line.Name);
}To build: dotnet build
To test: dotnet test src/TfL.Tests