Announce: alpha release of Google APIs for Go

6,103 views
Skip to first unread message

Brad Fitzpatrick

unread,
Aug 25, 2011, 5:51:51 AM8/25/11
to golang-nuts
Nuts,

I'm happy to announce the *alpha* availability of Go libraries for various Google APIs:

      http://code.google.com/p/google-api-go-client/

In particular, all "new-style" Google APIs are supported.  For some background, see http://www.google.com/events/io/2011/sessions/life-of-a-google-api-developer.html .  In summary, all new and upcoming Google APIs are self-describing (see http://code.google.com/apis/discovery/ ) and from the JSON description of an API you can generate a client library for any language (now including Go).  Older Google APIs that haven't [yet?] converted to the new-style API infrastructure aren't supported by this.

The google-api-go-client project linked above contains both the code generator as well as the auto-generated and goinstall-able packages for each Google API, like:


... for the http://goo.gl/ URL Shortener API.

Note that it currently requires a tip version of Go, though, not the r59 release. Once I'm happy that the code is relatively bug-free and it graduates from alpha to beta, then I'll make sure it works with the "release" version of Go.  Until then, though, it's much easier for me to only work at tip.

If you have any interest, please help me bang on this and find bugs. (Warning: I promise there are bugs)   Please file bugs at http://code.google.com/p/google-api-go-client/issues/list and I'll fix them.  There are some examples in the examples directory: http://code.google.com/p/google-api-go-client/source/browse/#hg%2Fexamples 

Enjoy!

Brad

Brad Fitzpatrick

unread,
Aug 26, 2011, 1:32:20 AM8/26/11
to golang-nuts
Message has been deleted

T.J. Yang

unread,
Nov 17, 2012, 10:28:40 PM11/17/12
to golan...@googlegroups.com


On Friday, August 26, 2011 12:32:20 AM UTC-5, bradfitz wrote:
Now with docs:

Did anyone able to use golang to interact with Google API ?
I followed GettingStarted wiki and in the end endup with following issue.


All the examples have "RegisterDemo" functions are not defined in the google-api-go-client library.


tj 

Brad Fitzpatrick

unread,
Nov 17, 2012, 10:54:01 PM11/17/12
to T.J. Yang, golan...@googlegroups.com
I replied on the bug.

--
 
 

Message has been deleted

Brad Fitzpatrick

unread,
Nov 18, 2012, 12:07:19 PM11/18/12
to T.J. Yang, golan...@googlegroups.com


On Sun, Nov 18, 2012 at 3:40 AM, T.J. Yang <tjyan...@gmail.com> wrote:


On Saturday, November 17, 2012 9:54:14 PM UTC-6, bradfitz wrote:
I replied on the bug.

Thanks for the pointer, after following extra steps, I see ./examples bin got created without error.


Why sudo?  You shouldn't run "go get" as root.  Do you not have your GOPATH set?  See https://www.youtube.com/watch?feature=player_embedded&v=XCsL89YtqCs

Cody Goodman

unread,
Jan 9, 2013, 12:57:42 AM1/9/13
to golan...@googlegroups.com


Brad, do you know when/if there will be youtube support in the near future? I've wrote my own api for dealing with youtube movies in Go,  but I'm not sure if it would be of much help or not.

Andrew Gerrand

unread,
Jan 9, 2013, 1:04:03 AM1/9/13
to Cody Goodman, Ikai Lan, golang-nuts
On 8 January 2013 21:57, Cody Goodman <codygman....@gmail.com> wrote:
Brad, do you know when/if there will be youtube support in the near future? I've wrote my own api for dealing with youtube movies in Go,  but I'm not sure if it would be of much help or not.

I believe it's in the works; Ikai (cc'd, he works on YouTube) should be able to shed some more light.

Andrew

Andrew Gerrand

unread,
Jan 9, 2013, 6:04:48 PM1/9/13
to Ikai Lan, Cody Goodman, golang-nuts

Ikai Lan

unread,
Jan 9, 2013, 5:47:54 PM1/9/13
to Andrew Gerrand, Cody Goodman, golang-nuts
Hi Cody,

The current client will work with the v3 APIs right now. I'm working on some Go samples as we speak (with lots of help from Andrew).


--
Ikai Lan

Ikai Lan

unread,
Jan 11, 2013, 10:33:26 AM1/11/13
to Andrew Gerrand, Ikai Lan, Cody Goodman, golang-nuts
Cody, we're not ready to submit this to the documentation site yet, but here's one of the samples Andrew and I wrote:


It'll take you through the entire OAuth 3 legged auth flow and make an authenticated API call.


--
 
 

Cody Goodman

unread,
Jan 13, 2013, 1:30:23 AM1/13/13
to golan...@googlegroups.com, Andrew Gerrand, Ikai Lan, Cody Goodman
Thanks Ikai, I've actually been writing lots of API's in Go lately and had to write one for youtube (I used the gdata feeds api). Thanks for the example though, I ended up writing my own oauth1 wrapper for Amazon before finding others! I'm sure this one will come in handy.

Mike Rosset

unread,
Jan 13, 2013, 2:39:12 AM1/13/13
to Ikai Lan, Andrew Gerrand, Ikai Lan, Cody Goodman, golang-nuts
https://gist.github.com/1f746b018664f604e4cc#file-gistfile1-go-L172

nice, I guess this will produce a application accept page?
> --
>
>

ad...@tophyips.info

unread,
Mar 23, 2015, 9:27:18 AM3/23/15
to golan...@googlegroups.com, ikai...@gmail.com, a...@golang.org, ik...@google.com, codygman....@gmail.com
Hi,

I have taken the sample from your link.
Wonder if the import library is changed, cause it got error (not valid path)

Reed O'Brien

unread,
Mar 23, 2015, 9:33:18 AM3/23/15
to golan...@googlegroups.com, ikai...@gmail.com, a...@golang.org, ik...@google.com, codygman....@gmail.com, ad...@tophyips.info
I think it moved. Try golang.org/x/oauth2

Hyip Gigafeed

unread,
Mar 27, 2015, 9:56:25 PM3/27/15
to golan...@googlegroups.com, ikai...@gmail.com, a...@golang.org, ik...@google.com, codygman....@gmail.com, ad...@tophyips.info
I tried golang.org/x/oauth2

Got error message as below:
cannot find package "golang.org/x/oauth2" in any of:
	/usr/src/go/src/golang.org/x/oauth2 (from $GOROOT)
	/go/src/golang.org/x/oauth2 (from $GOPATH)

Diego Medina

unread,
Mar 28, 2015, 12:31:50 AM3/28/15
to golan...@googlegroups.com
After updating the path in your go file, remember to run go get, I just tried it and it worked fine
Reply all
Reply to author
Forward
0 new messages