Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ap2json

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ap2json

Split one AP API request into many JSON files.

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 29 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc