Index: generated/googleapis_beta/README.md |
diff --git a/generated/googleapis_beta/README.md b/generated/googleapis_beta/README.md |
index 8bb38766b87fb58f38b90f6435eabee946124a1a..e9e7b12540b87d06d9a204ed11cf456a7e5f17b1 100644 |
--- a/generated/googleapis_beta/README.md |
+++ b/generated/googleapis_beta/README.md |
@@ -1,58 +1,67 @@ |
-# Package of Google APIs |
- |
-## Description |
- |
-This repository contains auto-generated client libraries for accessing |
-Google APIs using dart. It has the usual dart package layout. |
+Auto-generated Dart libraries for accessing [Google APIs][libs]. |
## Usage |
-The first step is to obtain oauth2 access credentials. This can be done using |
-the `googleapis_auth` package. Your application can access APIs on behalf of a |
+First, obtain OAuth 2.0 access credentials. This can be done using the |
+`googleapis_auth` package. Your application can access APIs on behalf of a |
user or using a service account. |
After obtaining credentials, an API from the `googleapis` package can be |
accessed with an authenticated HTTP client. |
-The following is an example of a command line application which lists files |
-in Google Drive by using a service account. |
+## Example |
+ |
+The following command line application lists files in Google Drive by using a |
+service account. |
Create a `pubspec.yaml` file with the `googleapis_auth` and `googleapis` |
dependencies. |
- ... |
- dependencies: |
- googleapis: any |
- googleapis_auth: any |
+```yaml |
+... |
+dependencies: |
+ googleapis: any |
+ googleapis_auth: any |
+``` |
Create a service account in the Google Cloud Console and save the credential |
-information. After that the Cloud Storage API can be accessed like this: |
- |
- import 'package:googleapis/storage/v1.dart'; |
- import 'package:googleapis_auth/auth_io.dart'; |
- |
- final Credentials = new ServiceAccountCredentials.fromJson(r''' |
- { |
- "private_key_id": ..., |
- "private_key": ..., |
- "client_email": ..., |
- "client_id": ..., |
- "type": "service_account" |
- } |
- '''); |
- |
- void main() { |
- clientViaServiceAccount(Credentials, |
- [StorageApi.DevstorageReadOnlyScope]).then((http) { |
- var storage = new StorageApi(http); |
- storage.buckets.list('dart-on-cloud').then((buckets) { |
- print("Received ${buckets.items.length} bucket names:"); |
- for (var file in buckets.items) { |
- print(file.name); |
- } |
- }); |
- }); |
- } |
+information. |
+ |
+Then create a Dart application to list files in a spececific project. *In the |
+example below, files from the `dart-on-cloud` project are listed.* |
+ |
+```dart |
+// bin/list_files.dart |
+ |
+import 'package:googleapis/storage/v1.dart'; |
+import 'package:googleapis_auth/auth_io.dart'; |
+ |
+final _credentials = new ServiceAccountCredentials.fromJson(r''' |
+{ |
+ "private_key_id": ..., |
+ "private_key": ..., |
+ "client_email": ..., |
+ "client_id": ..., |
+ "type": "service_account" |
+} |
+'''); |
+ |
+const _SCOPES = const [StorageApi.DevstorageReadOnlyScope]; |
+ |
+void main() { |
+ clientViaServiceAccount(_credentials, _SCOPES).then((http_client) { |
+ var storage = new StorageApi(http_client); |
+ storage.buckets.list('dart-on-cloud').then((buckets) { |
+ print("Received ${buckets.items.length} bucket names:"); |
+ for (var file in buckets.items) { |
+ print(file.name); |
+ } |
+ }); |
+ }); |
+} |
+``` |
+ |
+[libs]: https://developers.google.com/discovery/libraries/ |
## Available Google APIs |
@@ -121,7 +130,7 @@ Official API documentation: https://developers.google.com/compute/docs/instance- |
The Google Compute Engine Instance Group Updater API provides services for updating groups of Compute Engine Instances. |
-Official API documentation: |
+Official API documentation: https://developers.google.com/compute/docs/instance-groups/manager/v1beta2 |
####  Resource Views API - resourceviews v1beta1 |
@@ -141,7 +150,7 @@ API for Cloud SQL database instance management. |
Official API documentation: https://developers.google.com/cloud-sql/docs/admin-api/ |
-####  TaskQueue API - taskqueue v1beta2 |
+####  TaskQueue API - taskqueue v1beta2 |
Lets you access a Google App Engine Pull Task Queue over REST. |