2.0.1 • Published 8 years ago

ap2json v2.0.1

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

ap2json

Build Status

TODO explain how this only does primaries for now

Convert AP API results to many JSON files, one per state-party-racetype combination.

Usage: ap2json [options]

Options:
	-f, --file       File containing API election results. Must have a <races> field.  [string] [required]
	-d, --directory  Directory where ap2json will place the output JSON files.  [string] [required]
	-c, --clear      Whether to clear output directory before writing output files.  [boolean] [default: true]

	Examples:
		ap2json -f results.json -d output -c false

Real-world example

curl 'https://api.ap.org/v2/elections/2016-02-01?statepostal=IA&test=true&level=ru&apikey=<APTOKEN>&format=json' > ia.json
ap2json -f ia.json -d races

output

Install

npm install -g ap2json

2.0.1

8 years ago

2.0.0

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago