This repository contains auto-generated client libraries for accessing Google APIs using dart. It has the usual dart package layout.
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 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.
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. 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); } }); }); }
The following is a list of APIs that are currently available inside this package.
Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.
Official API documentation: https://developers.google.com/ad-exchange/buyer-rest
Gives Ad Exchange seller users access to their inventory and the ability to generate reports
Official API documentation: https://developers.google.com/ad-exchange/seller-rest/
Gives Ad Exchange seller users access to their inventory and the ability to generate reports
Official API documentation: https://developers.google.com/ad-exchange/seller-rest/
The Admin SDK Directory API lets you view and manage enterprise resources such as users and groups, administrative notifications, security features, and more.
Official API documentation: https://developers.google.com/admin-sdk/directory/
Email Migration API lets you migrate emails of users to Google backends.
Official API documentation: https://developers.google.com/admin-sdk/email-migration/v2/
Allows the administrators of Google Apps customers to fetch reports about the usage, collaboration, security and risk for their users.
Official API documentation: https://developers.google.com/admin-sdk/reports/
Gives AdSense publishers access to their inventory and the ability to generate reports
Official API documentation: https://developers.google.com/adsense/management/
Gives AdSense Hosts access to report generation, ad code generation, and publisher management capabilities.
Official API documentation: https://developers.google.com/adsense/host/
View and manage your Google Analytics data
Official API documentation: https://developers.google.com/analytics/
Lets Android application developers access their Google Play accounts.
Official API documentation: https://developers.google.com/android-publisher
Provides a historical view of activity.
Official API documentation: https://developers.google.com/google-apps/activity/
The Google App State API.
Official API documentation: https://developers.google.com/games/services/web/api/states
A data platform for customers to create, manage, share and query data.
Official API documentation: https://developers.google.com/bigquery/docs/overview
API for access to the data within Blogger.
Official API documentation: https://developers.google.com/blogger/docs/3.0/getting_started
Lets you search for books and manage your Google Books library.
Official API documentation: https://developers.google.com/books/docs/v1/getting_started
Lets you manipulate events and other calendar data.
Official API documentation: https://developers.google.com/google-apps/calendar/firstapp
An API for accessing civic information.
Official API documentation: https://developers.google.com/civic-information
An API for accessing civic information.
Official API documentation: https://developers.google.com/civic-information
An API for accessing civic information.
Official API documentation: https://developers.google.com/civic-information
API for the Google Compute Engine service.
Official API documentation: https://developers.google.com/compute/docs/reference/latest/
Manage product items, inventory, and Merchant Center accounts for Google Shopping.
Official API documentation: https://developers.google.com/shopping-content/v2/
Lets you view and manage jobs in a Coordinate team.
Official API documentation: https://developers.google.com/coordinate/
Lets you search over a website or collection of websites
Official API documentation: https://developers.google.com/custom-search/v1/using_rest
Lets you create, run and download reports.
Official API documentation: https://developers.google.com/doubleclick-advertisers/reporting/
Lets you discover information about other Google APIs, such as what APIs are available, the resource and method details for each API.
Official API documentation: https://developers.google.com/discovery/
API for viewing and managing your reports in DoubleClick Bid Manager.
Official API documentation: https://developers.google.com/bid-manager/
Report and modify your advertising data in DoubleClick Search (for example, campaigns, ad groups, keywords, and conversions).
Official API documentation: https://developers.google.com/doubleclick-search/
The API to interact with Drive.
Official API documentation: https://developers.google.com/drive/
Find Freebase entities using textual queries and other constraints.
Official API documentation: https://developers.google.com/freebase/
API for working with Fusion Tables data.
Official API documentation: https://developers.google.com/fusiontables
The API for Google Play Game Services.
Official API documentation: https://developers.google.com/games/services/
The Management API for Google Play Game Services.
Official API documentation: https://developers.google.com/games/services
The Gmail REST API.
Official API documentation: https://developers.google.com/gmail/api/
Groups Migration Api.
Official API documentation: https://developers.google.com/google-apps/groups-migration/
Lets you manage permission levels and related settings of a group.
Official API documentation: https://developers.google.com/google-apps/groups-settings/get_started
Help the third party sites to implement federated login.
Official API documentation: https://developers.google.com/identity-toolkit/v3/
Licensing API to view and manage license for your domain.
Official API documentation: https://developers.google.com/google-apps/licensing/
The Google Maps Engine API allows developers to store and query geospatial vector and raster data.
Official API documentation: https://developers.google.com/maps-engine/
API for interacting with Glass users via the timeline.
Official API documentation: https://developers.google.com/glass
Lets you access OAuth2 protocol related APIs.
Official API documentation: https://developers.google.com/accounts/docs/OAuth2
Lets you analyze the performance of a web page and get tailored suggestions to make that page faster.
Official API documentation: https://developers.google.com/speed/docs/insights/v1/getting_started
The Google+ API enables developers to build on top of the Google+ platform.
Official API documentation: https://developers.google.com/+/api/
The Google+ API enables developers to build on top of the Google+ platform.
Official API documentation: https://developers.google.com/+/domains/
Lets you access a cloud hosted machine learning service that makes it easy to build smart apps
Official API documentation: https://developers.google.com/prediction/docs/developer-guide
Lets you find the least expensive flights between an origin and a destination.
Official API documentation: http://developers.google.com/qpx-express
Lets you create and manage your customers and their subscriptions.
Official API documentation: https://developers.google.com/google-apps/reseller/
Lets you programatically verify ownership of websites or domains with Google.
Official API documentation: https://developers.google.com/site-verification/
Lets you store and retrieve potentially-large, immutable data objects.
Official API documentation: https://developers.google.com/storage/docs/json_api/
Lets you manage your tasks and task lists.
Official API documentation: https://developers.google.com/google-apps/tasks/firstapp
Lets you translate text from one language to another
Official API documentation: https://developers.google.com/translate/v2/using_rest
Lets you create, inspect, and manage goo.gl short URLs
Official API documentation: http://code.google.com/apis/urlshortener/v1/getting_started.html
The Google Fonts Developer API.
Official API documentation: https://developers.google.com/fonts/docs/developer_api
Lets you view Google Webmaster Tools data for your verified sites.
Official API documentation: https://developers.google.com/webmaster-tools/v3/welcome
Programmatic access to YouTube features.
Official API documentation: https://developers.google.com/youtube/v3
Retrieve your YouTube Analytics reports.
Official API documentation: http://developers.google.com/youtube/analytics/