New APIs!

209 views
Skip to first unread message

Michael Sittig

unread,
Aug 3, 2011, 9:38:28 PM8/3/11
to GoogleCL Discuss
Hey all!

Just added support for the new Discovery APIs to GoogleCL.

What does this mean? Lots of new APIs are available! Including Tasks,
Buzz, UrlShortener, Translate, and a dozen or so others.

So please, go test! Instructions and examples will be up soonish.

-Michael

Marcos Kobylecki

unread,
Apr 18, 2012, 4:14:43 PM4/18/12
to googlecl...@googlegroups.com
Can anyone post/link to a step by step anywhere, how to enable Services Discovery so that, from my Ubuntu Linux when I run:

google tasks list

it will list my tasks or prompt for the first-time authentication, NOT:

Did you specify the service correctly? Must be one of 'picasa', 'blogger', 'youtube', 'docs', 'contacts', 'calendar', 'finance'

After installing the googlecl .deb packages from the Ubuntu repository, I also ran:
easy_install google-api-python-client

That seemed to complete okay but still nothing more than those initial 7 google services are available.

Jason Holt

unread,
Apr 18, 2012, 4:23:56 PM4/18/12
to googlecl...@googlegroups.com
There are some instructions here:
http://code.google.com/p/googlecl/wiki/DiscoveryManual

The .deb packages don't include discovery support, so you'll have to check the sources out of svn.

Jason Holt

unread,
Apr 18, 2012, 4:41:41 PM4/18/12
to googlecl...@googlegroups.com
The source tab shows how to check out the source using svn:

Then you can cd into the src/ directory and run google.py.  It can be tricky to make sure that googlecl finds the right versions of things; you can search for PYTHONPATH.  And being on Windows can make things trickier too.  

Marcos Kobylecki

unread,
Apr 18, 2012, 5:47:32 PM4/18/12
to googlecl...@googlegroups.com
Thanks, that was helpful.

I began posting all the pieces in a question for Ubuntu users at

http://askubuntu.com/questions/123239/how-to-enable-services-discovery-api-in-googlecl

I thought still no good until I noticed there was another 'google' executable that does get results for tasks:

 /usr/local/src/googlecl-read-only/build/scripts-2.7/google tasks tasks list \*


So, it's related to what you pointed out about PYTHONPATH and version mismatches of googlecl and its components.  It seems now I have two versions of googlecl (distro and custom) but at least I know how to invoke the one with extra services:

  The available services are
'help', 'picasa', 'blogger', 'youtube', 'docs', 'contacts', 'calendar', 'finance'
  and via Discovery:
'adexchangebuyer', 'adsense', 'analytics', 'audit', 'bigquery', 'blogger', 'books', 'calendar', 'customsearch', 'discovery', 'freebase', 'gan', 'groupssettings', 'moderator', 'oauth2', 'orkut', 'pagespeedonline', 'plus', 'prediction', 'shopping', 'siteVerification', 'taskqueue', 'tasks', 'translate', 'urlshortener', 'webfonts'
  Enter "> help more" for more detailed help.
  Enter "> help <service>" for more information on a service.
  Or, just "quit" to quit.

Great!

So it turned out the repos didn't have the discovery-supporting version yet, and meanwhile I'm uncertain of the clean way the newer googlecl should be installed as the default one, but I can proceed with my scripting.




On Wednesday, April 18, 2012 10:41:41 PM UTC+2, jholt wrote:
The source tab shows how to check out the source using svn:

Then you can cd into the src/ directory and run google.py.  It can be tricky to make sure that googlecl finds the right versions of things; you can search for PYTHONPATH.  And being on Windows can make things trickier too.  

Jason Holt

unread,
Apr 18, 2012, 5:59:54 PM4/18/12
to googlecl...@googlegroups.com
Glad to hear it worked for you!

./setup.py install ought to install it, although from a sysadmin's standpoint, my rule is that if I can't install something from a .deb, I try not to install it at all.  In the case of googlecl, there's no trickery needed, since python doesn't need to be compiled or installed to work; you can just stick your svn checkout wherever is convenient for you and run google.py from there.

Boyd Kelly

unread,
Dec 29, 2013, 1:38:27 AM12/29/13
to googlecl...@googlegroups.com
Hi,

I'm not to sure what to do here.  I have checked out the source code for googlecl and run python setup.py install.   As root I can run: /usr/local/src/googlecl-read-only/build/scripts-2.7/google tasks tasks list \*, (as above) albeit with a web page that says: Error:invalid_client The OAuth client was deleted.

However as a non privileged user I get a lot of python errors that end in:

File "/usr/lib64/python2.7/ssl.py", line 141, in __init__
    ciphers)
ssl.SSLError: [Errno 185090050] _ssl.c:340: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib

Since python setup.py installs to /usr/bin, shouldn't I be able to run as a regular user?  What is missing?

Thanks!

Boyd
Reply all
Reply to author
Forward
0 new messages