large Flutter Favorite logosmall Flutter Favorite logo

googleapis 9.1.0 icon indicating copy to clipboard operation
googleapis: ^9.1.0 copied to clipboard

Auto-generated client libraries for accessing Google APIs described through the API discovery service.

example/main.dart

/// This example demonstrates usage for a Dart command line application.
///
/// For details of how to use this package in Flutter, see
/// https://flutter.cn/docs/development/data-and-backend/google-apis

import 'package:googleapis/storage/v1.dart';
import 'package:googleapis_auth/auth_io.dart';

Future<void> main() async {
  final httpClient = await clientViaApplicationDefaultCredentials(scopes: [
    StorageApi.devstorageReadOnlyScope,
  ]);
  try {
    final storage = StorageApi(httpClient);

    final buckets = await storage.buckets.list('dart-on-cloud');
    final items = buckets.items!;
    print('Received ${items.length} bucket names:');
    for (var file in items) {
      print(file.name);
    }
  } finally {
    httpClient.close();
  }
}
548
likes
130
pub points
99%
popularity

Publisher

verified publisher icongoogle.dev

Auto-generated client libraries for accessing Google APIs described through the API discovery service.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

Dependencies

_discoveryapis_commons, http

More

Packages that depend on googleapis