Martin Kustermann | 3aa3349 | 2014-11-17 15:03:40 +0100 | [diff] [blame] | 1 | Auto-generated Dart libraries for accessing [Google APIs][libs]. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 2 | |
| 3 | ## Usage |
| 4 | |
Martin Kustermann | 3aa3349 | 2014-11-17 15:03:40 +0100 | [diff] [blame] | 5 | First, obtain OAuth 2.0 access credentials. This can be done using the |
| 6 | `googleapis_auth` package. Your application can access APIs on behalf of a |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 7 | user or using a service account. |
| 8 | |
| 9 | After obtaining credentials, an API from the `googleapis` package can be |
| 10 | accessed with an authenticated HTTP client. |
| 11 | |
Martin Kustermann | 3aa3349 | 2014-11-17 15:03:40 +0100 | [diff] [blame] | 12 | ## Example |
| 13 | |
| 14 | The following command line application lists files in Google Drive by using a |
| 15 | service account. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 16 | |
| 17 | Create a `pubspec.yaml` file with the `googleapis_auth` and `googleapis` |
| 18 | dependencies. |
| 19 | |
Martin Kustermann | 3aa3349 | 2014-11-17 15:03:40 +0100 | [diff] [blame] | 20 | ```yaml |
| 21 | ... |
| 22 | dependencies: |
| 23 | googleapis: any |
| 24 | googleapis_auth: any |
| 25 | ``` |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 26 | |
| 27 | Create a service account in the Google Cloud Console and save the credential |
Martin Kustermann | 3aa3349 | 2014-11-17 15:03:40 +0100 | [diff] [blame] | 28 | information. |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 29 | |
Martin Kustermann | 3aa3349 | 2014-11-17 15:03:40 +0100 | [diff] [blame] | 30 | Then create a Dart application to list files in a spececific project. *In the |
| 31 | example below, files from the `dart-on-cloud` project are listed.* |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 32 | |
Martin Kustermann | 3aa3349 | 2014-11-17 15:03:40 +0100 | [diff] [blame] | 33 | ```dart |
| 34 | // bin/list_files.dart |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 35 | |
Martin Kustermann | 3aa3349 | 2014-11-17 15:03:40 +0100 | [diff] [blame] | 36 | import 'package:googleapis/storage/v1.dart'; |
| 37 | import 'package:googleapis_auth/auth_io.dart'; |
| 38 | |
| 39 | final _credentials = new ServiceAccountCredentials.fromJson(r''' |
| 40 | { |
| 41 | "private_key_id": ..., |
| 42 | "private_key": ..., |
| 43 | "client_email": ..., |
| 44 | "client_id": ..., |
| 45 | "type": "service_account" |
| 46 | } |
| 47 | '''); |
| 48 | |
| 49 | const _SCOPES = const [StorageApi.DevstorageReadOnlyScope]; |
| 50 | |
| 51 | void main() { |
| 52 | clientViaServiceAccount(_credentials, _SCOPES).then((http_client) { |
| 53 | var storage = new StorageApi(http_client); |
| 54 | storage.buckets.list('dart-on-cloud').then((buckets) { |
| 55 | print("Received ${buckets.items.length} bucket names:"); |
| 56 | for (var file in buckets.items) { |
| 57 | print(file.name); |
| 58 | } |
| 59 | }); |
| 60 | }); |
| 61 | } |
| 62 | ``` |
| 63 | |
| 64 | [libs]: https://developers.google.com/discovery/libraries/ |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 65 | |
| 66 | ## Available Google APIs |
| 67 | |
| 68 | The following is a list of APIs that are currently available inside this |
| 69 | package. |
| 70 | |
| 71 | ####  Ad Exchange Buyer API - adexchangebuyer v1.3 |
| 72 | |
| 73 | Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports. |
| 74 | |
| 75 | Official API documentation: https://developers.google.com/ad-exchange/buyer-rest |
| 76 | |
| 77 | ####  Ad Exchange Seller API - adexchangeseller v1.1 |
| 78 | |
| 79 | Gives Ad Exchange seller users access to their inventory and the ability to generate reports |
| 80 | |
| 81 | Official API documentation: https://developers.google.com/ad-exchange/seller-rest/ |
| 82 | |
Søren Gjesse | a7d1bd0 | 2014-09-29 17:56:55 +0200 | [diff] [blame] | 83 | ####  Ad Exchange Seller API - adexchangeseller v2.0 |
| 84 | |
| 85 | Gives Ad Exchange seller users access to their inventory and the ability to generate reports |
| 86 | |
| 87 | Official API documentation: https://developers.google.com/ad-exchange/seller-rest/ |
| 88 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 89 | ####  Admin Directory API - admin directory_v1 |
| 90 | |
| 91 | The Admin SDK Directory API lets you view and manage enterprise resources such as users and groups, administrative notifications, security features, and more. |
| 92 | |
| 93 | Official API documentation: https://developers.google.com/admin-sdk/directory/ |
| 94 | |
Martin Kustermann | 0abb810 | 2014-09-23 16:10:54 +0200 | [diff] [blame] | 95 | ####  Email Migration API v2 - admin email_migration_v2 |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 96 | |
| 97 | Email Migration API lets you migrate emails of users to Google backends. |
| 98 | |
| 99 | Official API documentation: https://developers.google.com/admin-sdk/email-migration/v2/ |
| 100 | |
| 101 | ####  Admin Reports API - admin reports_v1 |
| 102 | |
| 103 | Allows the administrators of Google Apps customers to fetch reports about the usage, collaboration, security and risk for their users. |
| 104 | |
| 105 | Official API documentation: https://developers.google.com/admin-sdk/reports/ |
| 106 | |
| 107 | ####  AdSense Management API - adsense v1.4 |
| 108 | |
| 109 | Gives AdSense publishers access to their inventory and the ability to generate reports |
| 110 | |
| 111 | Official API documentation: https://developers.google.com/adsense/management/ |
| 112 | |
| 113 | ####  AdSense Host API - adsensehost v4.1 |
| 114 | |
| 115 | Gives AdSense Hosts access to report generation, ad code generation, and publisher management capabilities. |
| 116 | |
| 117 | Official API documentation: https://developers.google.com/adsense/host/ |
| 118 | |
Martin Kustermann | 3242d2e | 2014-10-20 19:17:43 +0200 | [diff] [blame] | 119 | ####  Google Analytics API - analytics v3 |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 120 | |
| 121 | View and manage your Google Analytics data |
| 122 | |
| 123 | Official API documentation: https://developers.google.com/analytics/ |
| 124 | |
| 125 | ####  Google Play Android Developer API - androidpublisher v2 |
| 126 | |
| 127 | Lets Android application developers access their Google Play accounts. |
| 128 | |
| 129 | Official API documentation: https://developers.google.com/android-publisher |
| 130 | |
| 131 | ####  Google Apps Activity API - appsactivity v1 |
| 132 | |
| 133 | Provides a historical view of activity. |
| 134 | |
| 135 | Official API documentation: https://developers.google.com/google-apps/activity/ |
| 136 | |
| 137 | ####  Google App State API - appstate v1 |
| 138 | |
| 139 | The Google App State API. |
| 140 | |
| 141 | Official API documentation: https://developers.google.com/games/services/web/api/states |
| 142 | |
| 143 | ####  BigQuery API - bigquery v2 |
| 144 | |
| 145 | A data platform for customers to create, manage, share and query data. |
| 146 | |
| 147 | Official API documentation: https://developers.google.com/bigquery/docs/overview |
| 148 | |
| 149 | ####  Blogger API - blogger v3 |
| 150 | |
| 151 | API for access to the data within Blogger. |
| 152 | |
| 153 | Official API documentation: https://developers.google.com/blogger/docs/3.0/getting_started |
| 154 | |
Søren Gjesse | 42f9615 | 2014-12-01 15:16:51 +0100 | [diff] [blame^] | 155 | ####  Books API - books v1 |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 156 | |
| 157 | Lets you search for books and manage your Google Books library. |
| 158 | |
| 159 | Official API documentation: https://developers.google.com/books/docs/v1/getting_started |
| 160 | |
| 161 | ####  Calendar API - calendar v3 |
| 162 | |
| 163 | Lets you manipulate events and other calendar data. |
| 164 | |
| 165 | Official API documentation: https://developers.google.com/google-apps/calendar/firstapp |
| 166 | |
| 167 | ####  Google Civic Information API - civicinfo us_v1 |
| 168 | |
| 169 | An API for accessing civic information. |
| 170 | |
| 171 | Official API documentation: https://developers.google.com/civic-information |
| 172 | |
| 173 | ####  Google Civic Information API - civicinfo v1 |
| 174 | |
| 175 | An API for accessing civic information. |
| 176 | |
| 177 | Official API documentation: https://developers.google.com/civic-information |
| 178 | |
Søren Gjesse | a7d1bd0 | 2014-09-29 17:56:55 +0200 | [diff] [blame] | 179 | ####  Google Civic Information API - civicinfo v2 |
| 180 | |
| 181 | An API for accessing civic information. |
| 182 | |
| 183 | Official API documentation: https://developers.google.com/civic-information |
| 184 | |
Søren Gjesse | 2fcef16 | 2014-10-09 09:12:20 +0200 | [diff] [blame] | 185 | ####  Compute Engine API - compute v1 |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 186 | |
| 187 | API for the Google Compute Engine service. |
| 188 | |
| 189 | Official API documentation: https://developers.google.com/compute/docs/reference/latest/ |
| 190 | |
| 191 | ####  Content API for Shopping - content v2 |
| 192 | |
| 193 | Manage product items, inventory, and Merchant Center accounts for Google Shopping. |
| 194 | |
| 195 | Official API documentation: https://developers.google.com/shopping-content/v2/ |
| 196 | |
| 197 | ####  Google Maps Coordinate API - coordinate v1 |
| 198 | |
| 199 | Lets you view and manage jobs in a Coordinate team. |
| 200 | |
| 201 | Official API documentation: https://developers.google.com/coordinate/ |
| 202 | |
| 203 | ####  CustomSearch API - customsearch v1 |
| 204 | |
| 205 | Lets you search over a website or collection of websites |
| 206 | |
| 207 | Official API documentation: https://developers.google.com/custom-search/v1/using_rest |
| 208 | |
| 209 | ####  DFA Reporting API - dfareporting v1.3 |
| 210 | |
| 211 | Lets you create, run and download reports. |
| 212 | |
| 213 | Official API documentation: https://developers.google.com/doubleclick-advertisers/reporting/ |
| 214 | |
Martin Kustermann | c72d869 | 2014-09-12 11:44:55 +0200 | [diff] [blame] | 215 | ####  APIs Discovery Service - discovery v1 |
| 216 | |
| 217 | Lets you discover information about other Google APIs, such as what APIs are available, the resource and method details for each API. |
| 218 | |
| 219 | Official API documentation: https://developers.google.com/discovery/ |
| 220 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 221 | ####  DoubleClick Bid Manager API - doubleclickbidmanager v1 |
| 222 | |
| 223 | API for viewing and managing your reports in DoubleClick Bid Manager. |
| 224 | |
| 225 | Official API documentation: https://developers.google.com/bid-manager/ |
| 226 | |
| 227 | ####  DoubleClick Search API - doubleclicksearch v2 |
| 228 | |
| 229 | Report and modify your advertising data in DoubleClick Search (for example, campaigns, ad groups, keywords, and conversions). |
| 230 | |
| 231 | Official API documentation: https://developers.google.com/doubleclick-search/ |
| 232 | |
| 233 | ####  Drive API - drive v2 |
| 234 | |
| 235 | The API to interact with Drive. |
| 236 | |
| 237 | Official API documentation: https://developers.google.com/drive/ |
| 238 | |
Søren Gjesse | ee08177 | 2014-11-05 12:32:29 +0100 | [diff] [blame] | 239 | ####  Fitness - fitness v1 |
| 240 | |
| 241 | Google Fit API |
| 242 | |
Martin Kustermann | 3aa3349 | 2014-11-17 15:03:40 +0100 | [diff] [blame] | 243 | Official API documentation: https://developers.google.com/fit/rest/ |
| 244 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 245 | ####  Freebase Search - freebase v1 |
| 246 | |
| 247 | Find Freebase entities using textual queries and other constraints. |
| 248 | |
| 249 | Official API documentation: https://developers.google.com/freebase/ |
| 250 | |
| 251 | ####  Fusion Tables API - fusiontables v1 |
| 252 | |
| 253 | API for working with Fusion Tables data. |
| 254 | |
| 255 | Official API documentation: https://developers.google.com/fusiontables |
| 256 | |
Søren Gjesse | 42f9615 | 2014-12-01 15:16:51 +0100 | [diff] [blame^] | 257 | ####  Fusion Tables API - fusiontables v2 |
| 258 | |
| 259 | API for working with Fusion Tables data. |
| 260 | |
| 261 | Official API documentation: https://developers.google.com/fusiontables |
| 262 | |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 263 | ####  Google Play Game Services API - games v1 |
| 264 | |
| 265 | The API for Google Play Game Services. |
| 266 | |
| 267 | Official API documentation: https://developers.google.com/games/services/ |
| 268 | |
| 269 | ####  Google Play Game Services Management API - gamesManagement v1management |
| 270 | |
| 271 | The Management API for Google Play Game Services. |
| 272 | |
| 273 | Official API documentation: https://developers.google.com/games/services |
| 274 | |
| 275 | ####  Gmail API - gmail v1 |
| 276 | |
| 277 | The Gmail REST API. |
| 278 | |
| 279 | Official API documentation: https://developers.google.com/gmail/api/ |
| 280 | |
| 281 | ####  Groups Migration API - groupsmigration v1 |
| 282 | |
| 283 | Groups Migration Api. |
| 284 | |
| 285 | Official API documentation: https://developers.google.com/google-apps/groups-migration/ |
| 286 | |
| 287 | ####  Groups Settings API - groupssettings v1 |
| 288 | |
| 289 | Lets you manage permission levels and related settings of a group. |
| 290 | |
| 291 | Official API documentation: https://developers.google.com/google-apps/groups-settings/get_started |
| 292 | |
| 293 | ####  Google Identity Toolkit API - identitytoolkit v3 |
| 294 | |
| 295 | Help the third party sites to implement federated login. |
| 296 | |
| 297 | Official API documentation: https://developers.google.com/identity-toolkit/v3/ |
| 298 | |
| 299 | ####  Enterprise License Manager API - licensing v1 |
| 300 | |
| 301 | Licensing API to view and manage license for your domain. |
| 302 | |
| 303 | Official API documentation: https://developers.google.com/google-apps/licensing/ |
| 304 | |
| 305 | ####  Google Maps Engine API - mapsengine v1 |
| 306 | |
| 307 | The Google Maps Engine API allows developers to store and query geospatial vector and raster data. |
| 308 | |
| 309 | Official API documentation: https://developers.google.com/maps-engine/ |
| 310 | |
| 311 | ####  Google Mirror API - mirror v1 |
| 312 | |
| 313 | API for interacting with Glass users via the timeline. |
| 314 | |
| 315 | Official API documentation: https://developers.google.com/glass |
| 316 | |
| 317 | ####  Google OAuth2 API - oauth2 v2 |
| 318 | |
| 319 | Lets you access OAuth2 protocol related APIs. |
| 320 | |
| 321 | Official API documentation: https://developers.google.com/accounts/docs/OAuth2 |
| 322 | |
Søren Gjesse | 2fcef16 | 2014-10-09 09:12:20 +0200 | [diff] [blame] | 323 | ####  PageSpeed Insights API - pagespeedonline v1 |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 324 | |
| 325 | Lets you analyze the performance of a web page and get tailored suggestions to make that page faster. |
| 326 | |
| 327 | Official API documentation: https://developers.google.com/speed/docs/insights/v1/getting_started |
| 328 | |
| 329 | ####  Google+ API - plus v1 |
| 330 | |
| 331 | The Google+ API enables developers to build on top of the Google+ platform. |
| 332 | |
| 333 | Official API documentation: https://developers.google.com/+/api/ |
| 334 | |
| 335 | ####  Google+ Domains API - plusDomains v1 |
| 336 | |
| 337 | The Google+ API enables developers to build on top of the Google+ platform. |
| 338 | |
| 339 | Official API documentation: https://developers.google.com/+/domains/ |
| 340 | |
| 341 | ####  Prediction API - prediction v1.6 |
| 342 | |
| 343 | Lets you access a cloud hosted machine learning service that makes it easy to build smart apps |
| 344 | |
| 345 | Official API documentation: https://developers.google.com/prediction/docs/developer-guide |
| 346 | |
| 347 | ####  QPX Express API - qpxExpress v1 |
| 348 | |
| 349 | Lets you find the least expensive flights between an origin and a destination. |
| 350 | |
| 351 | Official API documentation: http://developers.google.com/qpx-express |
| 352 | |
| 353 | ####  Enterprise Apps Reseller API - reseller v1 |
| 354 | |
| 355 | Lets you create and manage your customers and their subscriptions. |
| 356 | |
| 357 | Official API documentation: https://developers.google.com/google-apps/reseller/ |
| 358 | |
| 359 | ####  Google Site Verification API - siteVerification v1 |
| 360 | |
| 361 | Lets you programatically verify ownership of websites or domains with Google. |
| 362 | |
| 363 | Official API documentation: https://developers.google.com/site-verification/ |
| 364 | |
| 365 | ####  Cloud Storage API - storage v1 |
| 366 | |
| 367 | Lets you store and retrieve potentially-large, immutable data objects. |
| 368 | |
| 369 | Official API documentation: https://developers.google.com/storage/docs/json_api/ |
| 370 | |
Søren Gjesse | ee08177 | 2014-11-05 12:32:29 +0100 | [diff] [blame] | 371 | ####  Tag Manager API - tagmanager v1 |
| 372 | |
| 373 | API for accessing Tag Manager accounts and containers. |
| 374 | |
| 375 | Official API documentation: https://developers.google.com/tag-manager/api/v1/ |
| 376 | |
| 377 | ####  Tasks API - tasks v1 |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 378 | |
| 379 | Lets you manage your tasks and task lists. |
| 380 | |
| 381 | Official API documentation: https://developers.google.com/google-apps/tasks/firstapp |
| 382 | |
Søren Gjesse | 42f9615 | 2014-12-01 15:16:51 +0100 | [diff] [blame^] | 383 | ####  Translate API - translate v2 |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 384 | |
| 385 | Lets you translate text from one language to another |
| 386 | |
| 387 | Official API documentation: https://developers.google.com/translate/v2/using_rest |
| 388 | |
| 389 | ####  URL Shortener API - urlshortener v1 |
| 390 | |
| 391 | Lets you create, inspect, and manage goo.gl short URLs |
| 392 | |
| 393 | Official API documentation: http://code.google.com/apis/urlshortener/v1/getting_started.html |
| 394 | |
| 395 | ####  Google Fonts Developer API - webfonts v1 |
| 396 | |
| 397 | The Google Fonts Developer API. |
| 398 | |
| 399 | Official API documentation: https://developers.google.com/fonts/docs/developer_api |
| 400 | |
Søren Gjesse | a7d1bd0 | 2014-09-29 17:56:55 +0200 | [diff] [blame] | 401 | ####  Webmaster Tools API - webmasters v3 |
| 402 | |
| 403 | Lets you view Google Webmaster Tools data for your verified sites. |
| 404 | |
| 405 | Official API documentation: https://developers.google.com/webmaster-tools/v3/welcome |
| 406 | |
| 407 | ####  YouTube Data API - youtube v3 |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 408 | |
| 409 | Programmatic access to YouTube features. |
| 410 | |
| 411 | Official API documentation: https://developers.google.com/youtube/v3 |
| 412 | |
Søren Gjesse | 42f9615 | 2014-12-01 15:16:51 +0100 | [diff] [blame^] | 413 | ####  YouTube Analytics API - youtubeAnalytics v1 |
Martin Kustermann | f9c50a2 | 2014-09-10 15:26:11 +0200 | [diff] [blame] | 414 | |
| 415 | Retrieve your YouTube Analytics reports. |
| 416 | |
| 417 | Official API documentation: http://developers.google.com/youtube/analytics/ |
| 418 | |