Anyone up for getting on board?
I'm nowhere near good enough at Node, JS or Ravens REST API to tackle
this on my own :)
--
Cheers,
w://
I whipped up a quick proof of concept node module this morning that
can query an index.
It was easy enough to get going, grabbing a dependency on the request
module helps.
I think the most difficult step would be defining a good API, there
are a lot of decisions to be made there around whether you try match
the C# implementation, or go your own way and build something that
makes sense for javascript.
On Dec 4, 7:16 am, Itamar Syn-Hershko <ita...@hibernatingrhinos.com>
wrote:
> We will be glad to assist should you need any help
>
> I'll prioritize docs for the HTTP API so you have more to go on...
>
> On Fri, Dec 2, 2011 at 12:15 PM, Wayne Douglas
> <codingvi...@googlemail.com>wrote:
>
>
>
> > I can See this being a seriously cool feature
>
> > Anyone up for getting on board?
>
> > I'm nowhere near good enough at Node, JS or Ravens REST API to tackle
> > this on my own :)
>
> > --
> > Cheers,
>
> > w://- Hide quoted text -
>
> - Show quoted text -
I think the most difficult step would be defining a good API, there
are a lot of decisions to be made there around whether you try match
the C# implementation, or go your own way and build something that
makes sense for javascript.
Client.prototype.getDatabaseNames = function(callback) {var self = this;request(self.constructQuery('/databases'), function(error, response, body){callback(JSON.parse(body));});}
This loses the error handling. You should make sure that debugging the client isn't a pure PITA, and losing the error handling like that would do that.
For that matter, you need to handle error handling for the scenario where you can't parse the json, etc.
var db = require('node-raven')('http://localhost:8080');db.queryIndex('Artists', { 'Name' : 'AC/DC' }, function (result, data) {if (result.error || !data) {// Somthing went wrong. See result.httpResponse, result.statusCode or result.contentreturn;}console.log(data.TotalResults); // 1console.log(data.Results[0].Name); // AC/DC});