chore: release v0.31.0 (#646)

1 file changed
tree: b1f24e370fd332459ef76623aefb64bd74bec000
  1. .github/
  2. abusiveexperiencereport/
  3. acceleratedmobilepageurl/
  4. accessapproval/
  5. accesscontextmanager/
  6. adexchangebuyer/
  7. adexchangebuyer2/
  8. adexchangeseller/
  9. adexperiencereport/
  10. admin/
  11. admob/
  12. adsense/
  13. adsensehost/
  14. alertcenter/
  15. analytics/
  16. analyticsreporting/
  17. androiddeviceprovisioning/
  18. androidenterprise/
  19. androidmanagement/
  20. androidpublisher/
  21. apigee/
  22. appengine/
  23. appsactivity/
  24. appstate/
  25. artifactregistry/
  26. bigquery/
  27. bigqueryconnection/
  28. bigquerydatatransfer/
  29. bigqueryreservation/
  30. bigtableadmin/
  31. billingbudgets/
  32. binaryauthorization/
  33. blogger/
  34. books/
  35. calendar/
  36. chat/
  37. chromeuxreport/
  38. civicinfo/
  39. classroom/
  40. cloudasset/
  41. cloudbilling/
  42. cloudbuild/
  43. cloudcommerceprocurement/
  44. clouddebugger/
  45. clouderrorreporting/
  46. cloudfunctions/
  47. cloudidentity/
  48. cloudiot/
  49. cloudkms/
  50. cloudprivatecatalog/
  51. cloudprivatecatalogproducer/
  52. cloudprofiler/
  53. cloudresourcemanager/
  54. cloudscheduler/
  55. cloudsearch/
  56. cloudshell/
  57. cloudtasks/
  58. cloudtrace/
  59. commentanalyzer/
  60. composer/
  61. compute/
  62. consumersurveys/
  63. container/
  64. containeranalysis/
  65. content/
  66. customsearch/
  67. datacatalog/
  68. dataflow/
  69. datafusion/
  70. dataproc/
  71. datastore/
  72. deploymentmanager/
  73. dfareporting/
  74. dialogflow/
  75. digitalassetlinks/
  76. discovery/
  77. displayvideo/
  78. dlp/
  79. dns/
  80. docs/
  81. documentai/
  82. domainsrdap/
  83. doubleclickbidmanager/
  84. doubleclicksearch/
  85. drive/
  86. driveactivity/
  87. examples/
  88. factchecktools/
  89. fcm/
  90. file/
  91. firebase/
  92. firebasedynamiclinks/
  93. firebasehosting/
  94. firebaseml/
  95. firebaseremoteconfig/
  96. firebaserules/
  97. firestore/
  98. fitness/
  99. fusiontables/
  100. games/
  101. gamesconfiguration/
  102. gameservices/
  103. gamesmanagement/
  104. genomics/
  105. gmail/
  106. gmailpostmastertools/
  107. google-api-go-generator/
  108. googleapi/
  109. groupsmigration/
  110. groupssettings/
  111. healthcare/
  112. homegraph/
  113. iam/
  114. iamcredentials/
  115. iap/
  116. identitytoolkit/
  117. idtoken/
  118. indexing/
  119. integration-tests/
  120. internal/
  121. iterator/
  122. jobs/
  123. kgsearch/
  124. language/
  125. lib/
  126. libraryagent/
  127. licensing/
  128. lifesciences/
  129. localservices/
  130. logging/
  131. managedidentities/
  132. manufacturers/
  133. memcache/
  134. mirror/
  135. ml/
  136. monitoring/
  137. networkmanagement/
  138. oauth2/
  139. option/
  140. osconfig/
  141. oslogin/
  142. pagespeedonline/
  143. partners/
  144. people/
  145. playablelocations/
  146. playcustomapp/
  147. playmoviespartner/
  148. plus/
  149. plusdomains/
  150. policytroubleshooter/
  151. poly/
  152. prod_tt_sasportal/
  153. proximitybeacon/
  154. pubsub/
  155. pubsublite/
  156. qpxexpress/
  157. realtimebidding/
  158. recommendationengine/
  159. recommender/
  160. redis/
  161. remotebuildexecution/
  162. replicapool/
  163. replicapoolupdater/
  164. reseller/
  165. run/
  166. runtimeconfig/
  167. safebrowsing/
  168. sasportal/
  169. script/
  170. searchconsole/
  171. secretmanager/
  172. securitycenter/
  173. servicebroker/
  174. serviceconsumermanagement/
  175. servicecontrol/
  176. servicedirectory/
  177. servicemanagement/
  178. servicenetworking/
  179. serviceusage/
  180. serviceuser/
  181. sheets/
  182. siteverification/
  183. slides/
  184. sourcerepo/
  185. spanner/
  186. spectrum/
  187. speech/
  188. sql/
  189. sqladmin/
  190. storage/
  191. storagetransfer/
  192. streetviewpublish/
  193. support/
  194. surveys/
  195. tagmanager/
  196. tasks/
  197. testing/
  198. texttospeech/
  199. toolresults/
  200. tpu/
  201. tracing/
  202. trafficdirector/
  203. translate/
  204. transport/
  205. urlshortener/
  206. vault/
  207. vectortile/
  208. verifiedaccess/
  209. videointelligence/
  210. vision/
  211. webfonts/
  212. webmasters/
  213. websecurityscanner/
  214. youtube/
  215. youtubeanalytics/
  216. youtubereporting/
  217. .gitignore
  218. .hgtags
  219. api-list.json
  220. AUTHORS
  221. CHANGES.md
  222. CONTRIBUTING.md
  223. CONTRIBUTORS
  224. doc.go
  225. GettingStarted.md
  226. go.mod
  227. go.sum
  228. LICENSE
  229. license_test.go
  230. NOTES
  231. README.md
  232. RELEASING.md
  233. synth.metadata
  234. synth.py
  235. TODO
  236. tools.go
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

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.

These client libraries are officially supported by Google. However, the libraries are considered complete and are in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.

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 (
        "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.