Update to new mechanism for finding the discovery URL for APIs.

The discovery API itself got broken under us; discoveryLink is no
longer populated and discoveryRestUrl is now an absolute URL to use.

Regenerate all the APIs as a result, and add a few new ones that
have now appeared.

Change-Id: Ie68f6af5288f3e3c5ee77536d6a255af90689cca
Reviewed-on: https://code-review.googlesource.com/4111
Reviewed-by: Michael McGreevy <mcgreevy@golang.org>
87 files changed
tree: fe19da160a3a5c4d55b4132c88b59d0b436c94fc
  1. adexchangebuyer/
  2. adexchangeseller/
  3. admin/
  4. adsense/
  5. adsensehost/
  6. analytics/
  7. androidenterprise/
  8. androidpublisher/
  9. appengine/
  10. appsactivity/
  11. appstate/
  12. autoscaler/
  13. bigquery/
  14. blogger/
  15. books/
  16. calendar/
  17. civicinfo/
  18. classroom/
  19. cloudbilling/
  20. cloudbuild/
  21. clouddebugger/
  22. cloudlatencytest/
  23. cloudmonitoring/
  24. cloudresourcemanager/
  25. cloudtrace/
  26. clouduseraccounts/
  27. compute/
  28. container/
  29. content/
  30. coordinate/
  31. customsearch/
  32. dataflow/
  33. dataproc/
  34. datastore/
  35. deploymentmanager/
  36. dfareporting/
  37. discovery/
  38. dns/
  39. doubleclickbidmanager/
  40. doubleclicksearch/
  41. drive/
  42. examples/
  43. fitness/
  44. freebase/
  45. fusiontables/
  46. games/
  47. gamesconfiguration/
  48. gamesmanagement/
  49. gan/
  50. genomics/
  51. gensupport/
  52. gmail/
  53. google-api-go-generator/
  54. googleapi/
  55. groupsmigration/
  56. groupssettings/
  57. iam/
  58. identitytoolkit/
  59. integration-tests/
  60. kgsearch/
  61. lib/
  62. licensing/
  63. logging/
  64. manager/
  65. mapsengine/
  66. mirror/
  67. oauth2/
  68. pagespeedonline/
  69. partners/
  70. playmoviespartner/
  71. plus/
  72. plusdomains/
  73. prediction/
  74. proximitybeacon/
  75. pubsub/
  76. qpxexpress/
  77. replicapool/
  78. replicapoolupdater/
  79. reseller/
  80. resourceviews/
  81. script/
  82. serviceregistry/
  83. siteverification/
  84. spectrum/
  85. sqladmin/
  86. storage/
  87. storagetransfer/
  88. tagmanager/
  89. taskqueue/
  90. tasks/
  91. translate/
  92. urlshortener/
  93. vision/
  94. webfonts/
  95. webmasters/
  96. youtube/
  97. youtubeanalytics/
  98. youtubereporting/
  99. .hgignore
  100. .hgtags
  101. .travis.yml
  102. api-list.json
  103. AUTHORS
  104. CONTRIBUTING.md
  105. CONTRIBUTORS
  106. GettingStarted.md
  107. key.json.enc
  108. LICENSE
  109. Makefile
  110. NOTES
  111. README.md
  112. TODO
README.md

Google APIs Client Library for Go

Status

Build Status

These are auto-generated Go libraries from the Google Discovery Service's JSON description files of the available “new style” Google APIs.

Due to the auto-generated nature of this collection of libraries, complete APIs or specific versions can appear or go away without notice. As a result, you should always locally vendor any API(s) that your code relies upon.

Announcement email:

Getting started documentation:

In summary:

$ go get google.golang.org/api/storage/v1
$ go get google.golang.org/api/tasks/v1
$ go get google.golang.org/api/moderator/v1
... etc ...

For docs, see e.g.:

The package of a given import is the second-to-last component, before the version number.

For examples, see:

For support, use the golang-nuts@ mailing list:

Application Default Credentials Example

Application Default Credentials provide a simplified way to obtain credentials for authenticating with Google APIs.

The Application Default Credentials authenticate as the application itself, which make them great for working with Google Cloud APIs like Storage or Datastore. They are the recommended form of authentication when building applications that run on Google Compute Engine or Google App Engine.

Default credentials are provided by the golang.org/x/oauth2/google package. To use them, add the following import:

import "golang.org/x/oauth2/google"

Some credentials types require you to specify scopes, and service entry points may not inject them. If you encounter this situation you may need to specify scopes as follows:

import (
        "golang.org/x/net/context"
        "golang.org/x/oauth2/google"
        "google.golang.org/api/compute/v1"
)

func main() {
        // Use oauth2.NoContext if there isn't a good context to pass in.
        ctx := context.Background()

        client, err := google.DefaultClient(ctx, compute.ComputeScope)
        if err != nil {
                //...
        }
        computeService, err := compute.New(client)
        if err != nil {
                //...
        }
}

If you need a oauth2.TokenSource, use the DefaultTokenSource function:

ts, err := google.DefaultTokenSource(ctx, scope1, scope2, ...)
if err != nil {
        //...
}
client := oauth2.NewClient(ctx, ts)

See also: golang.org/x/oauth2/google package documentation.