Data Driver

Blog archive

Beer? There's an API for that!

I've been fooling around with REST services, getting JSON data back from free online sources and displaying it in Web or Windows Store apps via a ListView or FlipView, and so on.

After experimenting with the Windows Azure Mobile Services, which simplifies the back-end data-access process and lets you easily set up your own services, I was trying out other APIs and just had to pass on my latest discovery: beer.

Yup, there's an Open Beer Database, described as "a free, public database and API for beer information." Now, that's my kind of information. Not that I'm a lush or anything, but a beer API seems appropriate for these stressful times, what with the end of the world coming—and, worse yet, a holiday stay with the in-laws and family circus if civilization survives the predicted apocalypse. Then there's climate change, earth-destroying asteroids, sovereign insolvency, the fiscal cliff and Gangnam Style (hey, if you're talking Korean madmen druthers, give me that whacky Kim Jong Un and his ballistic missile toys in the North over Psy and his garbage music in the South any day).

Anyway, note that the Open Beer API "is currently a work-in-progress and is subject to change without notice." It returns data in JSON or JSONP (to work around cross-domain calls). It provides the usual CRUD operations via HTTP verbs GET, POST, PUT and DELETE and lets you retrieve breweries or beers, both as aggregates or singly by ID number.

For example, the beer with an ID of 2 is named the Bruin. Its description includes: "At once cuddly and ferocious, it combines a smooth, rich maltiness and mahogany color with a solid hop backbone and stealthy 7.6% alcohol." Hmm, cuddly and ferocious, much like that cute little Kim Jong Un himself (Psy is neither; I can't say here what Psy is).

The Open Beer Database includes an example for retrieving brewery information in JSONP format via JavaScript. It also points to client libraries for Ruby, PHP and Python.

So check it out the next time you're looking for an example REST service to toy around with, maybe over the holiday break. Me? I'll be up in Massachusetts, probably pounding Bruins (and I don't mean the local hockey team up there.)

Do you know of any wild and crazy REST APIs we can play with in our coding adventures? Please share your suggestions here or drop me a line.

Posted by David Ramel on 12/13/2012


comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube