Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tnc1997/dart-tfl-api-client
Please note that Client for TfL API is unofficial and not endorsed by TfL.
https://github.com/tnc1997/dart-tfl-api-client
client dart tfl-api
Last synced: 20 days ago
JSON representation
Please note that Client for TfL API is unofficial and not endorsed by TfL.
- Host: GitHub
- URL: https://github.com/tnc1997/dart-tfl-api-client
- Owner: tnc1997
- License: mit
- Created: 2019-07-09T08:56:10.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-01-01T07:26:54.000Z (about 1 month ago)
- Last Synced: 2025-01-01T08:21:51.014Z (about 1 month ago)
- Topics: client, dart, tfl-api
- Language: Dart
- Homepage: https://pub.dev/packages/tfl_api_client
- Size: 589 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
```shell
dart pub add tfl_api_client
```1. Create a variable to store your app key.
```dart
final appKey = Platform.environment['APP_KEY'];
```1. Obtain an HTTP client using your app key.
```dart
final client = clientViaAppKey(appKey);
```1. Create an API client using the HTTP client.
```dart
final api = TflApiClient(client: client);
```
1. Fetch data from the TfL API using the API client.```dart
final lines = await api.line.get(['metropolitan']);
```