Auto-generated Google APIs for Go
Go
Latest commit b9d03e6 Jan 17, 2017 @jba jba gen: use right context package
goimports picked the wrong one for paging_test.

Change-Id: Ib4966da793d783b7266e9c94079b6cd2c06a4139
Reviewed-on: https://code-review.googlesource.com/10370
Reviewed-by: Ross Light <light@google.com>
Permalink
Failed to load latest commit information.
acceleratedmobilepageurl/v1 all: regenerate all APIs Nov 17, 2016
adexchangebuyer all: regenerate APIs Jan 13, 2017
adexchangebuyer2/v2beta1 all: regenerate all APIs Nov 17, 2016
adexchangeseller all: regenerate all APIs Nov 17, 2016
admin all: regenerate APIs Jan 13, 2017
adsense all: regenerate all APIs Nov 17, 2016
adsensehost/v4.1 all: regenerate all APIs Nov 17, 2016
analytics all: regenerate APIs Jan 13, 2017
analyticsreporting/v4 all: regenerate APIs Jan 13, 2017
androidenterprise/v1 all: regenerate APIs Jan 13, 2017
androidpublisher all: regenerate APIs Jan 13, 2017
appengine all: regenerate APIs Jan 13, 2017
appsactivity/v1 all: regenerate all APIs Nov 17, 2016
appstate/v1 all: regenerate all APIs Nov 17, 2016
autoscaler/v1beta2 all: regenerate Oct 6, 2016
bigquery/v2 all: regenerate APIs Jan 13, 2017
blogger all: regenerate APIs Jan 13, 2017
books/v1 all: regenerate APIs Jan 13, 2017
calendar/v3 all: regenerate all APIs Nov 17, 2016
civicinfo/v2 all: regenerate all APIs Nov 17, 2016
classroom/v1 all: regenerate APIs Jan 13, 2017
cloudbilling/v1 all: regenerate all APIs Nov 17, 2016
cloudbuild/v1 all: regenerate APIs Jan 13, 2017
clouddebugger/v2 all: regenerate all APIs Nov 17, 2016
clouderrorreporting/v1beta1 all: regenerate APIs Jan 13, 2017
cloudkms/v1beta1 cloudkms: add to list of generated libraries Jan 11, 2017
cloudlatencytest/v2 all: regenerate Oct 6, 2016
cloudmonitoring/v2beta2 all: regenerate APIs Jan 13, 2017
cloudresourcemanager cloudresourcemanager: regenerate Jan 17, 2017
cloudtrace/v1 all: regenerate all APIs Nov 17, 2016
clouduseraccounts all: regenerate all APIs Nov 17, 2016
compute all: regenerate APIs Jan 13, 2017
consumersurveys/v2 all: regenerate all APIs Nov 17, 2016
container/v1 all: regenerate all APIs Nov 17, 2016
content all: regenerate APIs Jan 13, 2017
coordinate/v1 all: regenerate Oct 6, 2016
customsearch/v1 all: regenerate APIs Jan 13, 2017
dataflow/v1b3 all: regenerate APIs Jan 13, 2017
dataproc all: regenerate APIs Jan 13, 2017
datastore all: regenerate APIs Jan 13, 2017
deploymentmanager all: regenerate APIs Jan 13, 2017
dfareporting all: regenerate APIs Jan 13, 2017
discovery/v1 generator: consolidate type logic Dec 1, 2016
dns all: regenerate all APIs Nov 17, 2016
doubleclickbidmanager/v1 all: regenerate all APIs Nov 17, 2016
doubleclicksearch/v2 all: regenerate APIs Jan 13, 2017
drive all: regenerate APIs Jan 13, 2017
examples option: add license to files Jan 5, 2017
firebasedynamiclinks/v1 all: regenerate APIs Jan 13, 2017
firebaserules/v1 all: regenerate all APIs Nov 17, 2016
fitness/v1 all: regenerate APIs Jan 13, 2017
freebase/v1 all: regenerate Oct 6, 2016
fusiontables all: regenerate APIs Jan 13, 2017
games/v1 all: regenerate all APIs Nov 17, 2016
gamesconfiguration/v1configuration all: regenerate all APIs Nov 17, 2016
gamesmanagement/v1management all: regenerate all APIs Nov 17, 2016
gan/v1beta1 all: regenerate Oct 6, 2016
genomics all: regenerate APIs Jan 13, 2017
gensupport gen: unmarshal support for special float values Jan 9, 2017
gmail/v1 all: regenerate APIs Jan 13, 2017
google-api-go-generator gen: use right context package Jan 17, 2017
googleapi googleapi: add RawMessage type Dec 9, 2016
groupsmigration/v1 all: regenerate all APIs Nov 17, 2016
groupssettings/v1 all: regenerate all APIs Nov 17, 2016
iam all: regenerate all APIs Nov 17, 2016
identitytoolkit/v3 all: regenerate APIs Jan 13, 2017
integration-tests/storage option: add license to files Jan 5, 2017
internal option: add license to files Jan 5, 2017
iterator option: add license to files Jan 5, 2017
kgsearch/v1 all: regenerate all APIs Nov 17, 2016
language all: regenerate APIs Jan 13, 2017
lib/codereview codereview: change default cc to golang-codereviews Dec 20, 2013
licensing/v1 all: regenerate all APIs Nov 17, 2016
logging all: regenerate APIs Jan 13, 2017
manager/v1beta2 all: regenerate Oct 6, 2016
manufacturers/v1 all: regenerate all APIs Nov 17, 2016
mapsengine all: regenerate Oct 6, 2016
mirror/v1 all: regenerate APIs Jan 13, 2017
ml/v1beta1 all: regenerate APIs Jan 13, 2017
monitoring/v3 all: regenerate APIs Jan 13, 2017
oauth2 all: regenerate all APIs Nov 17, 2016
option option: add license to files Jan 5, 2017
pagespeedonline all: regenerate APIs Jan 13, 2017
partners/v2 all: regenerate APIs Jan 13, 2017
people/v1 all: regenerate all APIs Nov 17, 2016
playmoviespartner/v1 all: regenerate APIs Jan 13, 2017
plus/v1 all: regenerate APIs Jan 13, 2017
plusdomains/v1 all: regenerate APIs Jan 13, 2017
prediction all: regenerate APIs Jan 13, 2017
proximitybeacon/v1beta1 all: regenerate APIs Jan 13, 2017
pubsub all: regenerate APIs Jan 13, 2017
qpxexpress/v1 all: regenerate all APIs Nov 17, 2016
replicapool all: regenerate all APIs Nov 17, 2016
replicapoolupdater/v1beta1 all: regenerate all APIs Nov 17, 2016
reseller all: regenerate all APIs Nov 17, 2016
resourceviews all: regenerate all APIs Nov 17, 2016
runtimeconfig all: regenerate APIs Jan 13, 2017
safebrowsing/v4 all: regenerate all APIs Nov 17, 2016
script/v1 googleapi: add RawMessage type Dec 9, 2016
servicecontrol/v1 all: regenerate APIs Jan 13, 2017
servicemanagement/v1 all: regenerate APIs Jan 13, 2017
serviceregistry/v0.alpha all: regenerate Oct 6, 2016
sheets/v4 all: regenerate APIs Jan 13, 2017
siteverification/v1 all: regenerate all APIs Nov 17, 2016
slides/v1 all: regenerate APIs Jan 13, 2017
spectrum/v1explorer all: regenerate APIs Jan 13, 2017
speech/v1beta1 all: regenerate APIs Jan 13, 2017
sqladmin all: regenerate APIs Jan 13, 2017
storage all: regenerate all APIs Nov 21, 2016
storagetransfer/v1 googleapi: add RawMessage type Dec 9, 2016
support/bundler bundler: rename Close to Stop Dec 13, 2016
surveys/v2 all: regenerate all APIs Nov 17, 2016
tagmanager/v1 all: regenerate APIs Jan 13, 2017
taskqueue all: regenerate all APIs Nov 17, 2016
tasks/v1 all: regenerate all APIs Nov 17, 2016
toolresults/v1beta3 all: regenerate APIs Jan 13, 2017
translate/v2 all: regenerate APIs Jan 13, 2017
transport option: add license to files Jan 5, 2017
urlshortener/v1 all: regenerate all APIs Nov 17, 2016
vision/v1 all: regenerate APIs Jan 13, 2017
webfonts/v1 all: regenerate all APIs Nov 17, 2016
webmasters/v3 all: regenerate APIs Jan 13, 2017
youtube/v3 all: regenerate APIs Jan 13, 2017
youtubeanalytics all: regenerate APIs Jan 13, 2017
youtubereporting/v1 all: regenerate APIs Jan 13, 2017
.hgignore google-api-go-client: set opaque correctly in pre go1.1 versions Jun 18, 2013
.hgtags Add release tag. Feb 7, 2012
.travis.yml travis: update build to Go 1.6 and 1.7 (no 1.5) Sep 8, 2016
AUTHORS Add A+C files. Feb 7, 2012
CONTRIBUTING.md google-api-go-client: remove italics next to <> May 21, 2015
CONTRIBUTORS option: add license to files Jan 5, 2017
GettingStarted.md More doc tweaks to GettingStarted Mar 2, 2016
LICENSE a Google API -> Go code generator and base library Aug 24, 2011
Makefile google-api-go-client: Fix Makefile. Jan 5, 2016
NOTES google-api-go-client: add updated GettingStarted.md doc Apr 6, 2015
README.md google-api-go-client: add Application Default Credential example Sep 11, 2015
TODO google-api-go-client: add updated GettingStarted.md doc Apr 6, 2015
api-list.json all: regenerate APIs Jan 13, 2017
key.json.enc google-api-go-client: add start of integration tests for major APIs Nov 12, 2015

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.