Auto-generated Dart libraries for accessing Google APIs.

Usage

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.

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

Create a service account in the Google Cloud Console and save the credential 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.

// 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);
      }
    });
  });
}

Available Google APIs

The following is a list of APIs that are currently available inside this package.

Logo Ad Exchange Buyer API II - adexchangebuyer2 v2beta1

Accesses the latest features for managing Ad Exchange accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals.

Official API documentation: https://developers.google.com/ad-exchange/buyer-rest/guides/client-access/

Logo Google App Engine Admin API - appengine v1beta4

Provisions and manages App Engine applications.

Official API documentation: https://cloud.google.com/appengine/docs/admin-api/

Logo Google App Engine Admin API - appengine v1beta5

Provisions and manages App Engine applications.

Official API documentation: https://cloud.google.com/appengine/docs/admin-api/

Logo Stackdriver Error Reporting API - clouderrorreporting v1beta1

Stackdriver Error Reporting groups and counts similar errors from cloud services. The Stackdriver Error Reporting API provides a way to report new errors and read access to error groups and their associated errors.

Official API documentation: https://cloud.google.com/error-reporting/

Logo Google Cloud Key Management Service (KMS) API - cloudkms v1beta1

Manages encryption for your cloud services the same way you do on-premise. You can generate, use, rotate, and destroy AES256 encryption keys.

Official API documentation: https://cloud.google.com/kms/

Logo Cloud Monitoring API - cloudmonitoring v2beta2

Accesses Google Cloud Monitoring data.

Official API documentation: https://cloud.google.com/monitoring/v2beta2/

Logo Google Cloud Resource Manager API - cloudresourcemanager v1beta1

The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.

Official API documentation: https://cloud.google.com/resource-manager

Logo Cloud User Accounts API - clouduseraccounts beta

Creates and manages users and groups for accessing Google Compute Engine virtual machines.

Official API documentation: https://cloud.google.com/compute/docs/access/user-accounts/api/latest/

Logo Google Dataflow API - dataflow v1b3

Manages Google Cloud Dataflow projects on Google Cloud Platform.

Official API documentation: https://cloud.google.com/dataflow

Logo Google Cloud Dataproc API - dataproc v1beta1

Manages Hadoop-based clusters and jobs on Google Cloud Platform.

Official API documentation: https://cloud.google.com/dataproc/

Logo Google Cloud Datastore API - datastore v1beta2

Stores and queries data in Google Cloud Datastore.

Official API documentation: https://developers.google.com/datastore/

Logo Google Cloud Datastore API - datastore v1beta3

Accesses the schemaless NoSQL database to provide fully managed, robust, scalable storage for your application.

Official API documentation: https://cloud.google.com/datastore/

Logo DCM/DFA Reporting And Trafficking API - dfareporting v2.5beta1

Manages your DoubleClick Campaign Manager ad campaigns and reports.

Official API documentation: https://developers.google.com/doubleclick-advertisers/reporting/

Logo Google Cloud DNS API - dns v2beta1

Configures and serves authoritative DNS records.

Official API documentation: https://developers.google.com/cloud-dns

Logo Google Cloud Natural Language API - language v1beta1

Google Cloud Natural Language API provides natural language understanding technologies to developers. Examples include sentiment analysis, entity recognition, and text annotations.

Official API documentation: https://cloud.google.com/natural-language/

Logo Stackdriver Logging API - logging v2beta1

Writes log entries and manages your Stackdriver Logging configuration.

Official API documentation: https://cloud.google.com/logging/docs/

Logo Google Cloud Machine Learning - ml v1beta1

An API to enable creating and using machine learning models.

Official API documentation: https://cloud.google.com/ml/

Logo Google Proximity Beacon API - proximitybeacon v1beta1

Registers, manages, indexes, and searches beacons.

Official API documentation: https://developers.google.com/beacons/proximity/

Logo Google Cloud Pub/Sub API - pubsub v1beta2

Provides reliable, many-to-many, asynchronous messaging between applications.

Official API documentation: https://cloud.google.com/pubsub/docs

Logo Google Compute Engine Instance Group Manager API - replicapool v1beta2

Deprecated. Please use Instance Group Manager in Compute API Provides groups of homogenous Compute Engine instances.

Official API documentation: https://developers.google.com/compute/docs/instance-groups/manager/v1beta2

Logo Google Compute Engine Instance Group Updater API - replicapoolupdater v1beta1

Deprecated. Please use compute.instanceGroupManagers.update method. replicapoolupdater API will be disabled after December 30th, 2016 Updates groups of Compute Engine instances.

Official API documentation: https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service

Logo Resource Views API - resourceviews v1beta1

The Resource View API allows users to create and manage logical sets of Google Compute Engine instances.

Official API documentation: https://developers.google.com/compute/

Logo Google Compute Engine Instance Groups API - resourceviews v1beta2

The Resource View API allows users to create and manage logical sets of Google Compute Engine instances.

Official API documentation: https://developers.google.com/compute/

Logo Google Cloud RuntimeConfig API - runtimeconfig v1beta1

Provides capabilities for dynamic configuration and coordination for applications running on Google Cloud Platform.

Official API documentation: https://cloud.google.com/deployment-manager/runtime-configurator/

Logo Google Cloud Speech API - speech v1beta1

Google Cloud Speech API.

Official API documentation: https://cloud.google.com/speech/

Logo Cloud SQL Administration API - sqladmin v1beta3

Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.

Official API documentation: https://cloud.google.com/sql/docs/reference/latest

Logo Cloud SQL Administration API - sqladmin v1beta4

Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.

Official API documentation: https://cloud.google.com/sql/docs/reference/latest

Logo TaskQueue API - taskqueue v1beta2

Accesses a Google App Engine Pull Task Queue over REST.

Official API documentation: https://developers.google.com/appengine/docs/python/taskqueue/rest

Logo Cloud Tool Results API - toolresults v1beta3

Reads and publishes results from Cloud Test Lab.

Official API documentation: https://developers.google.com/cloud-test-lab/

Libraries

googleapis_beta.adexchangebuyer2.v2beta1

googleapis_beta.appengine.v1beta4

googleapis_beta.appengine.v1beta5

googleapis_beta.clouderrorreporting.v1beta1

googleapis_beta.cloudkms.v1beta1

googleapis_beta.cloudmonitoring.v2beta2

googleapis_beta.cloudresourcemanager.v1beta1

googleapis_beta.clouduseraccounts.beta

googleapis_beta.dataflow.v1b3

googleapis_beta.dataproc.v1beta1

googleapis_beta.datastore.v1beta2

googleapis_beta.datastore.v1beta3

googleapis_beta.dfareporting.v2_5beta1

googleapis_beta.dns.v2beta1

googleapis_beta.language.v1beta1

googleapis_beta.logging.v2beta1

googleapis_beta.ml.v1beta1

googleapis_beta.proximitybeacon.v1beta1

googleapis_beta.pubsub.v1beta2

googleapis_beta.replicapool.v1beta2

googleapis_beta.replicapoolupdater.v1beta1

googleapis_beta.resourceviews.v1beta1

googleapis_beta.resourceviews.v1beta2

googleapis_beta.runtimeconfig.v1beta1

googleapis_beta.speech.v1beta1

googleapis_beta.sqladmin.v1beta3

googleapis_beta.sqladmin.v1beta4

googleapis_beta.taskqueue.v1beta2

googleapis_beta.toolresults.v1beta3