tfl_api_client 1.0.0 copy "tfl_api_client: ^1.0.0" to clipboard
tfl_api_client: ^1.0.0 copied to clipboard

A client for accessing the TfL API. Please note that Client for TfL API is unofficial and not endorsed by TfL.

Client for TfL API #

A client for accessing the TfL API.

Please note that Client for TfL API is unofficial and not endorsed by TfL.

Getting Started #

  1. Add this package to your application.

    dart pub add tfl_api_client
    
    copied to clipboard
  2. Create a variable to store your app key.

    final appKey = Platform.environment['APP_KEY'];
    
    copied to clipboard
  3. Obtain an HTTP client using your app key.

    final client = clientViaAppKey(appKey);
    
    copied to clipboard
  4. Create an API client using the HTTP client.

    final api = TflApiClient(client: client);
    
    copied to clipboard
  5. Fetch data from the TfL API using the API client.

    final lines = await api.line.get(['metropolitan']);
    
    copied to clipboard
0
likes
150
points
26
downloads

Publisher

verified publisherthomasclark.dev

Weekly Downloads

2024.10.03 - 2025.04.17

A client for accessing the TfL API. Please note that Client for TfL API is unofficial and not endorsed by TfL.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on tfl_api_client