googleapis 1.0.0-beta.0
googleapis: ^1.0.0-beta.0 copied to clipboard

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

example/main.dart

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

final _credentials = ServiceAccountCredentials.fromJson(r'''
{
  "private_key_id": ...,
  "private_key": ...,
  "client_email": ...,
  "client_id": ...,
  "type": "service_account"
}
''');

const _scopes = [StorageApi.devstorageReadOnlyScope];

void main() {
  clientViaServiceAccount(_credentials, _scopes).then((httpClient) {
    final storage = StorageApi(httpClient);
    storage.buckets.list('dart-on-cloud').then((buckets) {
      print('Received ${buckets.items.length} bucket names:');
      for (var file in buckets.items) {
        print(file.name);
      }
    });
  });
}
194
likes
100
pub points
96%
popularity

Publisher

google.dev

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD (LICENSE)

Dependencies

_discoveryapis_commons, http

More

Packages that depend on googleapis