Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 581 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 581 Bytes

Transport for London API Wrapper

This is a .NET wrapper for the Transport for London API.

Getting Started

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);
}

Building and Testing

To build: dotnet build

To test: dotnet test src/TfL.Tests