Closed ameensol closed 10 years ago
Hi @ameensol, sure, and you can see an example of that in bin/ldf-client
.
Below is a minimal example:
var SparqlIterator = require('ldf-client').SparqlIterator,
FragmentsClient = require('ldf-client').FragmentsClient;
var config = {};
config.fragmentsClient = new FragmentsClient("http://data.linkeddatafragments.org/");
var sparqlIterator = new SparqlIterator("SELECT * WHERE { ?s ?p ?o } LIMIT 100", config);
sparqlIterator.on('data', console.log);
Should you have any further issues, don't hesitate to tell us about them!
It wasn't really clear from the docs if/how this module can be used from a node.js script, though I imagine it is possible.
Can it be used with require?