OLD | NEW |
(Empty) | |
| 1 # Package of Google APIs |
| 2 |
| 3 ## Description |
| 4 |
| 5 This repository contains auto-generated client libraries for accessing |
| 6 Google APIs using dart. It has the usual dart package layout. |
| 7 |
| 8 ## Usage |
| 9 |
| 10 The first step is to obtain oauth2 access credentials. This can be done using |
| 11 the `googleapis_auth` package. Your application can access APIs on behalf of a |
| 12 user or using a service account. |
| 13 |
| 14 After obtaining credentials, an API from the `googleapis` package can be |
| 15 accessed with an authenticated HTTP client. |
| 16 |
| 17 The following is an example of a command line application which lists files |
| 18 in Google Drive by using a service account. |
| 19 |
| 20 Create a `pubspec.yaml` file with the `googleapis_auth` and `googleapis` |
| 21 dependencies. |
| 22 |
| 23 ... |
| 24 dependencies: |
| 25 googleapis: any |
| 26 googleapis_auth: any |
| 27 |
| 28 Create a service account in the Google Cloud Console and save the credential |
| 29 information. After that the Cloud Storage API can be accessed like this: |
| 30 |
| 31 import 'package:googleapis/storage/v1.dart'; |
| 32 import 'package:googleapis_auth/auth_io.dart'; |
| 33 |
| 34 final Credentials = new ServiceAccountCredentials.fromJson(r''' |
| 35 { |
| 36 "private_key_id": ..., |
| 37 "private_key": ..., |
| 38 "client_email": ..., |
| 39 "client_id": ..., |
| 40 "type": "service_account" |
| 41 } |
| 42 '''); |
| 43 |
| 44 void main() { |
| 45 clientViaServiceAccount(Credentials, |
| 46 [StorageApi.DevstorageReadOnlyScope]).then((http)
{ |
| 47 var storage = new StorageApi(http); |
| 48 storage.buckets.list('dart-on-cloud').then((buckets) { |
| 49 print("Received ${buckets.items.length} bucket names:"); |
| 50 for (var file in buckets.items) { |
| 51 print(file.name); |
| 52 } |
| 53 }); |
| 54 }); |
| 55 } |
| 56 |
| 57 ## Available Google APIs |
| 58 |
| 59 The following is a list of APIs that are currently available inside this |
| 60 package. |
| 61 |
| 62 ####  Google Co
mpute Engine Autoscaler API - autoscaler v1beta2 |
| 63 |
| 64 The Google Compute Engine Autoscaler API provides autoscaling for groups of Clou
d VMs. |
| 65 |
| 66 Official API documentation: http://developers.google.com/compute/docs/autoscaler |
| 67 |
| 68 ####  Cloud Mon
itoring API - cloudmonitoring v2beta1 |
| 69 |
| 70 API for accessing Google Cloud and API monitoring data. |
| 71 |
| 72 Official API documentation: https://developers.google.com/cloud-monitoring/ |
| 73 |
| 74 ####  Google Cl
oud Datastore API - datastore v1beta2 |
| 75 |
| 76 API for accessing Google Cloud Datastore. |
| 77 |
| 78 Official API documentation: https://developers.google.com/datastore/ |
| 79 |
| 80 ####  Google Cl
oud DNS API - dns v1beta1 |
| 81 |
| 82 The Google Cloud DNS API provides services for configuring and serving authorita
tive DNS records. |
| 83 |
| 84 Official API documentation: https://developers.google.com/cloud-dns |
| 85 |
| 86 ####  Genomics
API - genomics v1beta |
| 87 |
| 88 Provides access to Genomics data. |
| 89 |
| 90 Official API documentation: https://developers.google.com/genomics/v1beta/refere
nce |
| 91 |
| 92 ####  Deploymen
t Manager API - manager v1beta2 |
| 93 |
| 94 The Deployment Manager API allows users to declaratively configure, deploy and r
un complex solutions on the Google Cloud Platform. |
| 95 |
| 96 Official API documentation: https://developers.google.com/deployment-manager/ |
| 97 |
| 98 ####  Cloud Pu
b/Sub API - pubsub v1beta1 |
| 99 |
| 100 Provides reliable, many-to-many, asynchronous messaging between applications. |
| 101 |
| 102 Official API documentation: https://developers.google.com/pubsub/v1beta1 |
| 103 |
| 104 ####  Replica P
ool API - replicapool v1beta1 |
| 105 |
| 106 The Replica Pool API allows users to declaratively provision and manage groups o
f Google Compute Engine instances based on a common template. |
| 107 |
| 108 Official API documentation: https://developers.google.com/compute/docs/replica-p
ool/ |
| 109 |
| 110 ####  Resource
Views API - resourceviews v1beta1 |
| 111 |
| 112 The Resource View API allows users to create and manage logical sets of Google C
ompute Engine instances. |
| 113 |
| 114 Official API documentation: https://developers.google.com/compute/ |
| 115 |
| 116 ####  Cloud SQL
Administration API - sqladmin v1beta3 |
| 117 |
| 118 API for Cloud SQL database instance management. |
| 119 |
| 120 Official API documentation: https://developers.google.com/cloud-sql/docs/admin-a
pi/ |
| 121 |
| 122 ####  TaskQ
ueue API - taskqueue v1beta2 |
| 123 |
| 124 Lets you access a Google App Engine Pull Task Queue over REST. |
| 125 |
| 126 Official API documentation: https://developers.google.com/appengine/docs/python/
taskqueue/rest |
| 127 |
OLD | NEW |