gtfs_realtime_bindings 1.1.0 copy "gtfs_realtime_bindings: ^1.1.0" to clipboard
gtfs_realtime_bindings: ^1.1.0 copied to clipboard

Provides Dart classes generated from the GTFS-realtime Protocol Buffer specification.

example/gtfs_realtime_bindings_example.dart

import 'package:http/http.dart' as http;

import 'package:gtfs_realtime_bindings/gtfs_realtime_bindings.dart';

void main() async {
  final url = Uri.parse('URL of your GTFS Realtime feed');
  final response = await http.get(url);

  if (response.statusCode == 200) {
    final feedMessage = FeedMessage.fromBuffer(response.bodyBytes);

    print('Number of entities: ${feedMessage.entity.length}.');
  } else {
    print('Request failed with status: ${response.statusCode}.');
  }
}
3
likes
150
pub points
61%
popularity

Publisher

verified publishervycius.lt

Provides Dart classes generated from the GTFS-realtime Protocol Buffer specification.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

fixnum, protobuf

More

Packages that depend on gtfs_realtime_bindings