Omar is on fire. Just a few days after publishing his Guide to creating a Google App Engine / Remix API / Facebook app, he’s released Remix.NET, a C# wrapper for the Best Buy Remix API.
Code sample:
Using Remix;
Product p = null;
try
{
Server remix = new Server("username", "password");
String filter = "iphone";
String postalcode = "94102";
String radius = "25";
bool tersemode = true;
int pagenum = 0;
// Get all Hardgoods that match "iphone" in the name attribute and
// are in stores in the 94102 area code in a 25 mile radius.
// When "tersemode" is true, only return a handful of information.
// (See method signature for details.)
Products list = remix.GetHardGoods(filter, tersemode, pagenum, postalcode, radius);
if (list.Count > 0) p = list[0];
}
catch (Exception e)
{
}
return p;
That catch block that absorbs all exception is, I assume, an example of what *not* to do.
January 31, 2009 at 4:46 pm
I dunno. Who needs exceptions anyway?
January 31, 2009 at 6:34 pm
Programmers who want well thought out error models? And ogres and fairies and other mythical creatures, of course.
February 8, 2009 at 5:23 am