googleapis_grpc 1.0.28+routingonly copy "googleapis_grpc: ^1.0.28+routingonly" to clipboard
googleapis_grpc: ^1.0.28+routingonly copied to clipboard

Auto-generated client libraries for accessing Google APIs through gRPC. Unofficial.

example/example.dart

import 'dart:io' show exit;

// Import the API you need
import 'package:googleapis_grpc/google_maps_routing_v2.dart';

// Install the `grpc` package to make the queries over network.
import 'package:grpc/grpc.dart';

void main() async {
  final channel = ClientChannel(
    'routes.googleapis.com',
    options: const ChannelOptions(credentials: ChannelCredentials.secure()),
  );

  final client = RoutesClient(
    channel,
    options: CallOptions(
      metadata: {
        'X-Goog-Api-Key': 'YOUR_API_KEY',
        'X-Goog-FieldMask': '*',
      },
    ),
  );

  final request = ComputeRoutesRequest(
    origin: Waypoint(
      address: 'Tour eiffel Paris',
    ),
    destination: Waypoint(
      address: 'Montmartre Paris',
    ),
  );

  final data = await client.computeRoutes(request);
  print(data);

  exit(0);
}
1
likes
140
points
1
downloads

Publisher

verified publisher66mobility.com

Weekly Downloads

Auto-generated client libraries for accessing Google APIs through gRPC. Unofficial.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

fixnum, grpc, protobuf

More

Packages that depend on googleapis_grpc