P@ Log

Patrick Chanezon about Platforms and Software Development


Counting Google APIs

May 27th, 2008 · No Comments

Up to last september, every time I gave a presentation about all Google APIs, I used to go to the Google Code page listing all the APIs and count the number of APIs Google offers manually.
This became difficult and last april for my Evans Data “Google, Opening up to developers” talk I came up with a script:

wget http://code.google.com/more/ -q -O | grep products-short-desc | wc -l

The page at that time was nicely marked up with a style called “products-short-desc” that I used as an unofficial microformat.
But the Google code team is working tirelessly to modernize the site and recently they switched to using Google Web Toolkit (download it, version 1.5 will soon be out with Java 1.5 support) for the site, and my script is broken. So I reached out to Jacob Moon, one of the Code engineers, and he explained that they now get the API list from a javascript file at http://code.google.com/js/codesite_product_dictionary.js.
I will now update my script to this one liner (you need to have Rhino installed)

js -e 'window=[];load("http://code.google.com/js/codesite_product_dictionary.js");print(window["CODESITE_productDictionary"].products.keys.length);'

Which tels us that we now offer 58 APIs!
Come learn more about them at Google I/O tomorrow and thursday.

For those of you who prefer the browser to the command line, you can go to http://code.google.com/more/ and paste this code in the url bar to the same effect.


Thanks Jacob!

Tags: , , ,

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment