The hPVI API
With the hPVI API you can now get the hPVIs you crave without having to find the blog post the hPVIs were in and scroll down past my dumb words preceeding the hPVIs to finally get to the goodness. If you want to get the 2017 hPVIs for the Minnesota Senate, send a get request to https://hpvi.tonypetrangelo.com/2017/senate and you will receive a sweet json object with the 2017 Minnesota Senate hPVIs.
How to use the hPVI API
There is no authorization required to access the API. To get the hPVIs send a get request to the location of the resource to want to access. The locations of the different resources are as follows:
All hPVIs for a district: [URL BASE] / [DISTRICT] (senate districts 1-67, house districts 1A-67B)
Example: https://hpvi.tonypetrangelo.com/48
All hPVIs for a chamber: [URL BASE] / [CHAMBER] (senate or house)
Example: https://hpvi.tonypetrangelo.com/senate
All hPVIs for a year: [URL BASE] / [YEAR] (2017 and 2015 are only years available)
Example: https://hpvi.tonypetrangelo.com/2017
All hPVIs for a chamber in a year: [URL BASE] / [YEAR] / [CHAMBER]
Example: https://hpvi.tonypetrangelo.com/2017/house
hPVI for a district in a year: [URL BASE] / [YEAR] / [DISTRICT]
Example: https://hpvi.tonypetrangelo.com/2017/44A