Permalink
Browse files

Added support for Recipes. Resolves issue #5

  • Loading branch information...
1 parent f7df314 commit 7e9b9fbb0dcedd2b8b2e4806ec102cec290f0815 @bryanmikaelian committed May 7, 2012
Showing with 27 additions and 0 deletions.
  1. +16 −0 example/recipe.js
  2. +11 −0 lib/battlenet.js
View
@@ -0,0 +1,16 @@
+var bnet = require("../lib/battlenet");
+
+var recipe = {
+ region: "us",
+ id: 33994
+};
+
+bnet.recipe(recipe, function(r) {
+
+});
+
+
+
+
+
+
View
@@ -144,6 +144,17 @@ var client = (function () {
get(options, function (data) {
callback(data);
});
+ },
+
+ recipe: function (recipe, callback) {
+ var options = {
+ host: "http://" + recipe.region + ".battle.net",
+ query: {},
+ path: "/api/wow/recipe/" + recipe.id
+ };
+ get(options, function (data) {
+ callback(data);
+ });
}
};

0 comments on commit 7e9b9fb

Please sign in to comment.