Yahoo! Developer Network Blog
« Previous | Main | Next »
October 6, 2009
YQL now with API keys baked in! Access the NYT, AMEE and Sunlight APIs more easily than ever before
It's with a great deal of pleasure that I get to announce a little something for you the developer. Our wonderful friends over at the New York Times, AMEE, and Sunlight Labs have kindly provided us with some default credentials for you to use when accessing their services.
This means YQL is the easiest way to access these APIs, no sign-up, no need to read documentation, no bull. Just query and go. Just add ?env=store://datatables.org/alltableswithkeys to your query url.
How did we work this marvel? We actually used some of the features of YQL that you can use for your other personal APIs keys too. The first thing we did was take the http://datatables.org/alltables.env environment file which adds all the "community tables". Next we added some set lines to it.
set apikey="1234567890" on nyt.movies.picks
In this line I set the fake API key 1234567890 for the key apikey on the nyt.movies.picks. By adding a bunch of these sets lines to an environment file you include with every query you can configure keys or other default values you want to use every query.
Finally, to protect the secret sauce we stored the environment files using yql.storage so you can happily use the store://datatables.org/alltableswithkeys but you can't access the secrets in it. This is a great way to store your own secret environment file.
But, don't forget, you don't have to use our default keys for any of the services above, you can always set your own keys or provide them with the where clause.
Enjoy, and get hacking!
Tom Hughes-Croucher
Yahoo! Developer Network
Posted at October 6, 2009 2:03 PM | Permalink
Comments
Post a comment
Comment Policy: We encourage comments and look forward to hearing from you. Please note that Yahoo! may, in our sole discretion, remove comments if they are off topic, inappropriate, or otherwise violate our Terms of Service. Fields marked with asterisk '*' are required.
Subscribe
Recent Blog Articles
view all
YQL Open Table for Google Buzz now live
Tue, 09 Feb 2010
INSERT INTO twitter.status ...
Mon, 08 Feb 2010
Announcing the Yahoo! Brasil Open Hack Day 2010, 20-21 March
Mon, 08 Feb 2010
Marketing hacks, linchpins, and tech women of valor
Sun, 07 Feb 2010
Yahoo! India invites you to join the first India Hadoop Summit
Thu, 04 Feb 2010
Recent Links
Appcelerator Titanium + Yahoo YQL on Vimeo
Mon, 08 Feb 2010
Tue, 02 Feb 2010
PhoneGap | Cross platform mobile framework
Sat, 30 Jan 2010
Web developers can rule the iPad - O'Reilly Radar
Sat, 30 Jan 2010
rc3.org - Is the iPad the harbinger of doom for personal computing?
Thu, 28 Jan 2010
Archives
2010
2009
2008
2007
2006
2005
Recent Readers

