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

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • 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.

Subscribe on YouTube