0.0.2 • Published 9 years ago

netfile-download v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

netfile-download

Downloads a zip file from a Netfile campaign finance disclosure portal. This will retrieve a zip file containing financial disclosure data for the year requested.

Install

npm install netfile-download

Example

var netfileDownload = require('netfile-download');

// Pass in aid, year, callback
netfileDownload('WESTSAC', '2014', function(err, zipBuffer) {
	// err is present if there was a problem getting requested file

	// zipBuffer is now a Buffer object containing the contents of the file
});

CLI

This module can also be installed globally.

npm install -g netfile-download

And used as a command line tool.

netfile-download -y 2014 -o outputfile.zip <aid>

Not setting the -y option uses the current year.

netfile-download -o outputfile_sac.zip SAC

Calling without setting an -o option will result in the file contents being written to stdout.

netfile-download SAC | unzip
0.0.2

9 years ago

0.0.1

9 years ago

0.0.0

9 years ago