Auto-generated Google APIs for Go
Go
Switch branches/tags
Nothing to show
Clone or download
googleapis-publisher all: autogenerated update (2018-08-14)
Update:
- bigquery/v2
- customsearch/v1
- vision/v1
- vision/v1p1beta1
- vision/v1p2beta1
Latest commit 0e8d13b Aug 13, 2018
Permalink
Failed to load latest commit information.
abusiveexperiencereport/v1 all: autogenerated update (2018-08-09) Aug 9, 2018
acceleratedmobilepageurl/v1 all: autogenerated update (2018-06-14) Jun 14, 2018
adexchangebuyer all: autogenerated update (2018-05-02) May 2, 2018
adexchangebuyer2/v2beta1 all: autogenerated update (2018-07-11) Jul 11, 2018
adexchangeseller all: autogenerated update (2018-05-02) May 2, 2018
adexperiencereport/v1 all: autogenerated update (2018-08-09) Aug 9, 2018
admin all: autogenerated update (2018-08-08) Aug 8, 2018
adsense all: autogenerated update (2018-08-07) Aug 7, 2018
adsensehost/v4.1 all: autogenerated update (2018-05-02) May 2, 2018
analytics all: autogenerated update (2018-07-17) Jul 17, 2018
analyticsreporting/v4 all: autogenerated update (2018-07-30) Jul 30, 2018
androiddeviceprovisioning/v1 all: autogenerated update (2018-08-07) Aug 7, 2018
androidenterprise/v1 many: manual update Aug 2, 2018
androidmanagement/v1 all: autogenerated update (2018-08-07) Aug 7, 2018
androidpublisher gen: make androidpublisher PurchaseType a pointer field. Jul 18, 2018
appengine many: manual update Aug 2, 2018
appsactivity/v1 all: autogenerated update (2018-08-08) Aug 8, 2018
appstate/v1 all: autogenerated update (2018-05-01) May 1, 2018
bigquery/v2 all: autogenerated update (2018-08-14) Aug 14, 2018
bigquerydatatransfer/v1 all: autogenerated update (2018-07-24) Jul 24, 2018
blogger all: autogenerated update (2018-05-02) May 2, 2018
books/v1 all: autogenerated update (2018-05-02) May 2, 2018
calendar/v3 many: manual update Aug 2, 2018
chat/v1 all: autogenerated update (2018-07-24) Jul 24, 2018
civicinfo/v2 all: autogenerated update (2018-07-24) Jul 24, 2018
classroom/v1 all: autogenerated update (2018-08-08) Aug 8, 2018
cloudbilling/v1 all: autogenerated update (2018-08-09) Aug 9, 2018
cloudbuild/v1 all: autogenerated update (2018-08-11) Aug 11, 2018
clouddebugger/v2 all: autogenerated update (2018-07-16) Jul 16, 2018
clouderrorreporting/v1beta1 all: autogenerated update (2018-07-24) Jul 24, 2018
cloudfunctions all: autogenerated update (2018-07-06) Jul 6, 2018
cloudiot many: manual update Aug 2, 2018
cloudkms/v1 all: autogenerated update (2018-08-09) Aug 9, 2018
cloudmonitoring/v2beta2 update local clients with latest generator changes Jan 31, 2018
cloudprofiler/v2 many: manual update Aug 2, 2018
cloudresourcemanager all: autogenerated update (2018-08-04) Aug 4, 2018
cloudshell all: autogenerated update (2018-08-11) Aug 11, 2018
cloudtasks/v2beta2 many: manual update Aug 2, 2018
cloudtrace all: autogenerated update (2018-06-10) Jun 10, 2018
clouduseraccounts all: autogenerated update (2018-02-07) Feb 7, 2018
composer/v1beta1 all: autogenerated update (2018-07-24) Jul 24, 2018
compute all: autogenerated update (2018-07-24) Jul 24, 2018
consumersurveys/v2 all: autogenerated update (2017-11-16) Nov 16, 2017
container all: autogenerated update (2018-08-11) Aug 11, 2018
content all: autogenerated update (2018-08-04) Aug 4, 2018
customsearch/v1 all: autogenerated update (2018-08-14) Aug 14, 2018
dataflow/v1b3 all: autogenerated update (2018-06-27) Jun 27, 2018
dataproc many: manual update Aug 2, 2018
datastore all: autogenerated update (2018-07-24) Jul 24, 2018
deploymentmanager all: autogenerated update (2018-06-12) Jun 12, 2018
dfareporting all: autogenerated update (2018-08-08) Aug 8, 2018
dialogflow all: autogenerated update (2018-08-09) Aug 9, 2018
digitalassetlinks/v1 all: autogenerated update (2018-06-12) Jun 12, 2018
discovery/v1 all: autogenerated update (2018-05-02) May 2, 2018
dlp all: autogenerated update (2018-08-11) Aug 11, 2018
dns all: autogenerated update (2018-05-02) May 2, 2018
doubleclickbidmanager/v1 all: autogenerated update (2018-05-01) May 1, 2018
doubleclicksearch/v2 all: autogenerated update (2018-05-02) May 2, 2018
drive all: autogenerated update (2018-07-24) Jul 24, 2018
examples examples: remove examples for Google Cloud APIs Jun 29, 2018
firebasedynamiclinks/v1 all: autogenerated update (2018-06-21) Jun 21, 2018
firebaseremoteconfig/v1 all: autogenerated update (2018-02-07) Feb 7, 2018
firebaserules/v1 all: autogenerated update (2018-06-14) Jun 14, 2018
firestore all: autogenerated update (2018-08-04) Aug 4, 2018
fitness/v1 all: autogenerated update (2018-05-02) May 2, 2018
fusiontables all: autogenerated update (2018-05-02) May 2, 2018
games/v1 all: autogenerated update (2018-05-01) May 1, 2018
gamesconfiguration/v1configuration all: autogenerated update (2018-05-02) May 2, 2018
gamesmanagement/v1management all: autogenerated update (2018-05-01) May 1, 2018
genomics all: autogenerated update (2018-08-08) Aug 8, 2018
gensupport gensupport: fix race in multipartReader.Close May 30, 2018
gmail/v1 all: autogenerated update (2018-05-02) May 2, 2018
google-api-go-generator gen: make androidpublisher PurchaseType a pointer field. Jul 18, 2018
googleapi Strip URL after colon in relstr and append later Jun 6, 2018
groupsmigration/v1 all: autogenerated update (2018-08-09) Aug 9, 2018
groupssettings/v1 all: autogenerated update (2018-07-01) Jul 1, 2018
iam/v1 many: manual update Aug 2, 2018
iamcredentials/v1 all: autogenerated update (2018-08-04) Aug 4, 2018
iap/v1beta1 all: autogenerated update (2018-08-08) Aug 8, 2018
identitytoolkit/v3 all: autogenerated update (2018-05-19) May 19, 2018
indexing/v3 all: autogenerated update (2018-06-27) Jun 27, 2018
integration-tests/storage integration-tests/storage: exit test on RPC error Jun 7, 2017
internal internal: use google.CredentialsFromJSON Mar 13, 2018
iterator iterator: fix bufLen doc Dec 7, 2017
jobs all: autogenerated update (2018-08-09) Aug 9, 2018
kgsearch/v1 all: autogenerated update (2018-02-07) Feb 7, 2018
language generator: add deprecation notices to superseded packages Jul 12, 2018
lib/codereview codereview: change default cc to golang-codereviews Dec 20, 2013
licensing/v1 all: autogenerated update (2018-05-02) May 2, 2018
logging all: autogenerated update (2018-08-11) Aug 11, 2018
manufacturers/v1 all: autogenerated update (2018-06-12) Jun 12, 2018
mirror/v1 all: autogenerated update (2018-05-02) May 2, 2018
ml/v1 all: autogenerated update (2018-08-08) Aug 8, 2018
monitoring/v3 many: manual update Aug 2, 2018
oauth2 all: autogenerated update (2018-05-02) May 2, 2018
option transport/grpc,option: warn about using an API key with a gRPC client. Jul 23, 2018
oslogin generator: add deprecation notices to superseded packages Jul 12, 2018
pagespeedonline all: autogenerated update (2018-06-12) Jun 12, 2018
partners/v2 all: autogenerated update (2018-06-10) Jun 10, 2018
people/v1 all: autogenerated update (2018-06-05) Jun 5, 2018
photoslibrary/v1 all: autogenerated update (2018-05-09) May 9, 2018
playcustomapp/v1 all: autogenerated update (2018-05-02) May 2, 2018
playmoviespartner/v1 update local clients with latest generator changes Jan 31, 2018
plus/v1 all: autogenerated update (2018-05-02) May 2, 2018
plusdomains/v1 all: autogenerated update (2018-05-02) May 2, 2018
poly/v1 all: autogenerated update (2018-08-11) Aug 11, 2018
prediction all: autogenerated update (2018-02-07) Feb 7, 2018
proximitybeacon/v1beta1 all: autogenerated update (2018-06-12) Jun 12, 2018
pubsub many: manual update Aug 2, 2018
qpxexpress/v1 update local clients with latest generator changes Jan 31, 2018
redis/v1beta1 all: autogenerated update (2018-07-16) Jul 16, 2018
replicapool all: autogenerated update (2018-05-02) May 2, 2018
replicapoolupdater/v1beta1 all: autogenerated update (2018-05-02) May 2, 2018
reseller/v1 all: autogenerated update (2018-05-02) May 2, 2018
resourceviews all: autogenerated update (2018-05-02) May 2, 2018
runtimeconfig many: manual update Aug 2, 2018
safebrowsing/v4 all: autogenerated update (2018-06-27) Jun 27, 2018
script/v1 all: autogenerated update (2018-08-04) Aug 4, 2018
searchconsole/v1 all: autogenerated update (2018-06-05) Jun 5, 2018
servicebroker all: autogenerated update (2018-07-17) Jul 17, 2018
serviceconsumermanagement/v1 all: autogenerated update (2018-08-11) Aug 11, 2018
servicecontrol/v1 all: autogenerated update (2018-08-11) Aug 11, 2018
servicemanagement/v1 all: autogenerated update (2018-08-11) Aug 11, 2018
serviceusage all: autogenerated update (2018-08-11) Aug 11, 2018
serviceuser/v1 all: autogenerated update (2018-08-11) Aug 11, 2018
sheets/v4 many: manual update Aug 2, 2018
siteverification/v1 all: autogenerated update (2018-05-01) May 1, 2018
slides/v1 all: autogenerated update (2018-07-24) Jul 24, 2018
sourcerepo/v1 all: autogenerated update (2018-07-24) Jul 24, 2018
spanner/v1 generator: add deprecation notices to superseded packages Jul 12, 2018
spectrum/v1explorer all: autogenerated update (2018-05-01) May 1, 2018
speech generator: add deprecation notices to superseded packages Jul 12, 2018
sqladmin many: manual update Aug 2, 2018
storage generator: add deprecation notices to superseded packages Jul 12, 2018
storagetransfer/v1 all: autogenerated update (2018-06-03) Jun 3, 2018
streetviewpublish/v1 all: autogenerated update (2018-06-05) Jun 5, 2018
support/bundler bundler: support concurrent handler invocations Feb 7, 2018
surveys/v2 all: autogenerated update (2018-05-13) May 13, 2018
tagmanager all: autogenerated update (2018-05-01) May 1, 2018
taskqueue all: autogenerated update (2018-02-07) Feb 7, 2018
tasks/v1 all: autogenerated update (2018-05-02) May 2, 2018
testing/v1 all: autogenerated update (2018-07-16) Jul 16, 2018
texttospeech many: manual update Aug 2, 2018
toolresults all: autogenerated update (2018-08-11) Aug 11, 2018
tpu all: autogenerated update (2018-08-08) Aug 8, 2018
tracing/v2 update local clients with latest generator changes Jan 31, 2018
translate/v2 generator: add deprecation notices to superseded packages Jul 12, 2018
transport transport: use the new Stackdriver import path Aug 2, 2018
urlshortener/v1 all: autogenerated update (2018-05-02) May 2, 2018
vault/v1 many: manual update Aug 2, 2018
videointelligence generator: add deprecation notices to superseded packages Jul 12, 2018
vision all: autogenerated update (2018-08-14) Aug 14, 2018
webfonts/v1 all: autogenerated update (2018-05-02) May 2, 2018
webmasters/v3 all: autogenerated update (2018-05-02) May 2, 2018
websecurityscanner/v1alpha many: manual update Aug 2, 2018
youtube/v3 all: autogenerated update (2018-05-04) May 4, 2018
youtubeanalytics all: autogenerated update (2018-06-05) Jun 5, 2018
youtubereporting/v1 all: autogenerated update (2018-06-05) Jun 5, 2018
.gitignore google-api-go-generator: move Makefile up from root Aug 17, 2017
.hgtags Add release tag. Feb 7, 2012
.travis.yml travis: add 1.9 build, test latest minor versions Oct 31, 2017
AUTHORS Add A+C files. Feb 7, 2012
CONTRIBUTING.md google-api-go-client: remove italics next to <> May 21, 2015
CONTRIBUTORS Strip URL after colon in relstr and append later Jun 6, 2018
GettingStarted.md GettingStarted.md: show how to get googleapi.Error Jun 7, 2018
LICENSE a Google API -> Go code generator and base library Aug 24, 2011
NOTES google-api-go-client: add updated GettingStarted.md doc Apr 6, 2015
README.md github: Promote GCP library usage May 23, 2018
TODO google-api-go-client: add updated GettingStarted.md doc Apr 6, 2015
api-list.json all: autogenerated update (2018-08-14) Aug 14, 2018
key.json.enc .travis.yml: replace service account key May 19, 2017

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.

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