all: autogenerated update (2017-12-14)

Add:
- dlp/v2beta2

Update:
- adexchangebuyer2/v2beta1
- androidmanagement/v1
- calendar/v3
- cloudresourcemanager/v1
- cloudresourcemanager/v1beta1
- cloudtasks/v2beta2
- dialogflow/v2beta1
- drive/v2
- drive/v3
- speech/v1
- speech/v1beta1
108 files changed
tree: f49936acf7064c1be7e00454baffa90b96f950c4
  1. abusiveexperiencereport/
  2. acceleratedmobilepageurl/
  3. adexchangebuyer/
  4. adexchangebuyer2/
  5. adexchangeseller/
  6. adexperiencereport/
  7. admin/
  8. adsense/
  9. adsensehost/
  10. analytics/
  11. analyticsreporting/
  12. androiddeviceprovisioning/
  13. androidenterprise/
  14. androidmanagement/
  15. androidpublisher/
  16. appengine/
  17. appsactivity/
  18. appstate/
  19. bigquery/
  20. bigquerydatatransfer/
  21. blogger/
  22. books/
  23. calendar/
  24. civicinfo/
  25. classroom/
  26. cloudbilling/
  27. cloudbuild/
  28. clouddebugger/
  29. clouderrorreporting/
  30. cloudfunctions/
  31. cloudiot/
  32. cloudkms/
  33. cloudmonitoring/
  34. cloudresourcemanager/
  35. cloudshell/
  36. cloudtasks/
  37. cloudtrace/
  38. clouduseraccounts/
  39. compute/
  40. consumersurveys/
  41. container/
  42. content/
  43. customsearch/
  44. dataflow/
  45. dataproc/
  46. datastore/
  47. deploymentmanager/
  48. dfareporting/
  49. dialogflow/
  50. discovery/
  51. dlp/
  52. dns/
  53. doubleclickbidmanager/
  54. doubleclicksearch/
  55. drive/
  56. examples/
  57. firebasedynamiclinks/
  58. firebaseremoteconfig/
  59. firebaserules/
  60. firestore/
  61. fitness/
  62. fusiontables/
  63. games/
  64. gamesconfiguration/
  65. gamesmanagement/
  66. genomics/
  67. gensupport/
  68. gmail/
  69. google-api-go-generator/
  70. googleapi/
  71. groupsmigration/
  72. groupssettings/
  73. iam/
  74. identitytoolkit/
  75. integration-tests/
  76. internal/
  77. iterator/
  78. kgsearch/
  79. language/
  80. lib/
  81. licensing/
  82. logging/
  83. manufacturers/
  84. mirror/
  85. ml/
  86. monitoring/
  87. oauth2/
  88. option/
  89. oslogin/
  90. pagespeedonline/
  91. partners/
  92. people/
  93. playcustomapp/
  94. playmoviespartner/
  95. plus/
  96. plusdomains/
  97. poly/
  98. prediction/
  99. proximitybeacon/
  100. pubsub/
  101. qpxexpress/
  102. replicapool/
  103. replicapoolupdater/
  104. reseller/
  105. resourceviews/
  106. runtimeconfig/
  107. safebrowsing/
  108. script/
  109. searchconsole/
  110. serviceconsumermanagement/
  111. servicecontrol/
  112. servicemanagement/
  113. serviceuser/
  114. sheets/
  115. siteverification/
  116. slides/
  117. sourcerepo/
  118. spanner/
  119. spectrum/
  120. speech/
  121. sqladmin/
  122. storage/
  123. storagetransfer/
  124. streetviewpublish/
  125. support/
  126. surveys/
  127. tagmanager/
  128. taskqueue/
  129. tasks/
  130. testing/
  131. toolresults/
  132. tpu/
  133. tracing/
  134. translate/
  135. transport/
  136. urlshortener/
  137. vault/
  138. videointelligence/
  139. vision/
  140. webfonts/
  141. webmasters/
  142. youtube/
  143. youtubeanalytics/
  144. youtubereporting/
  145. .gitignore
  146. .hgtags
  147. .travis.yml
  148. api-list.json
  149. AUTHORS
  150. CONTRIBUTING.md
  151. CONTRIBUTORS
  152. GettingStarted.md
  153. key.json.enc
  154. LICENSE
  155. NOTES
  156. README.md
  157. TODO
README.md

Google APIs Client Library for Go

Getting Started

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

and using:

package main

import (
	"net/http"

	"google.golang.org/api/urlshortener/v1"
)

func main() {
	svc, err := urlshortener.New(http.DefaultClient)
	// ...
}

Status

Build Status GoDoc

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.

This client library is supported, but in maintenance mode only. We are fixing necessary bugs and adding essential features to ensure this library continues to meet your needs for accessing Google APIs. Non-critical issues will be closed. Any issue may be reopened if it is causing ongoing problems.

If you're working with Google Cloud Platform APIs such as Datastore or Pub/Sub, consider using the Cloud Client Libraries for Go instead. These are the new and idiomatic Go libraries targeted specifically at Google Cloud Platform Services.

The generator itself and the code it produces are beta. Some APIs are alpha/beta, and indicated as such in the import path (e.g., “google.golang.org/api/someapi/v1alpha”).

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.