npm.io
1.0.2 • Published 10 years ago

ctdataindex

Licence
MIT
Version
1.0.2
Deps
3
Vulns
1
Weekly
0

ctdataindex

A simple node.js package for retrieving the list of CT Open Datasets from Socrata.

Intall the package: npm install ctdataindex

Usage:

var myidx = require('ctdataindex');  
var y = myidx.getSocrataList(); // returns an Object containing a Promise  
var dsListPromise = y.dsPromise; // get the Promise from the Object  
dsListPromise.then(function (theList) {  
    process(theList);  
}).catch(function(listError) {  
    processError(listError);  
});  

If you aren't familiar with Promises please check out these links:

The format of the list of datasets returned is described in the schema at:

https://project-open-data.cio.gov/v1.1/schema/

Keywords