aclu-national / elections-api

An API for retrieving locally-relevant structured data about US elections
https://elections.api.aclu.org/v2/
MIT License
30 stars 4 forks source link

Term caveat props #34

Open dphiffer opened 4 years ago

dphiffer commented 4 years ago

NOTE this is branched from the python3 branch, only this commit is unique to the PR: https://github.com/aclu-national/elections-api/pull/34/commits/149a81dd2ff32927b37ae3bdf3940baf9f702b65

This addresses an issue with how we show term_ended_early and term_started_late. For legislators who were in Congress for the 115th session and not the 116th (or vice versa), there is a problem of ambiguity about which term these caveats are describing.

This changes the singular term property to an array of terms, where each term object has its own term_ended_early and term_started_late caveats.