Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an API endpoint for votes #10

Open
3 tasks
waldoj opened this issue Feb 14, 2018 · 2 comments
Open
3 tasks

Create an API endpoint for votes #10

waldoj opened this issue Feb 14, 2018 · 2 comments

Comments

@waldoj
Copy link
Member

waldoj commented Feb 14, 2018

Per https://twitter.com/mjgoldsmith/status/963598295661776896

  • create an endpoint for a single vote
  • modify the bill endpoint to include vote IDs, and possibly the URL for the API call for that vote information
  • perhaps create an endpoint to list all votes for a given year (that might be better as bulk data)
@waldoj waldoj changed the title Creat an API endpoint for votes Create an API endpoint for votes Feb 14, 2018
@waldoj
Copy link
Member Author

waldoj commented Feb 15, 2018

vote.php is getting vote data via the Vote class, which is...not existing?

I'm confused.

waldoj added a commit to openva/richmondsunlight.com that referenced this issue Feb 17, 2018
Somehow I omitted this and never noticed? This solves a problem on
openva/rs-api#10.
waldoj added a commit to openva/richmondsunlight.com that referenced this issue Feb 17, 2018
waldoj added a commit that referenced this issue Feb 18, 2018
@waldoj
Copy link
Member Author

waldoj commented Feb 18, 2018

Here's what it's returning right now for e.g. https://api.richmondsunlight.com/1.1/vote/2018/h09v0069.json:

 {
  "chamber": "house",
  "outcome": "pass",
  "tally": "18-4",
  "legislators": [
    {
      "name": "Bagby, Lamont",
      "shortname": "lbagby",
      "vote": "Y",
      "party": "D",
      "chamber": "house",
      "address": "P. O. Box 406, Richmond, VA 23218",
      "started": "2016",
      "district": "74"
    },
    {
      "name": "Bell, Dickie",
      "shortname": "rpbell",
      "vote": "Y",
      "party": "R",
      "chamber": "house",
      "address": "2620 Eston Drive Staunton, VA 24401",
      "started": "2010",
      "district": "20"
    },
    {
      "name": "Bourne, Jeff",
      "shortname": "jmbourne",
      "vote": "Y",
      "party": "D",
      "chamber": "house",
      "address": null,
      "started": "2017",
      "district": "71"
    },
    {
      "name": "Boysko, Jennifer",
      "shortname": "jbboysko",
      "vote": "Y",
      "party": "D",
      "chamber": "house",
      "address": "730 Elden Street, Herndon, VA 20170",
      "started": "2016",
      "district": "86"
    },
    {
      "name": "Bulova, David",
      "shortname": "dlbulova",
      "vote": "Y",
      "party": "D",
      "chamber": "house",
      "address": "P. O. Box 106, Fairfax, VA 22039",
      "started": "2006",
      "district": "37"
    },
    {
      "name": "Cole, Mark",
      "shortname": "mlcole",
      "vote": "Y",
      "party": "R",
      "chamber": "house",
      "address": "P.O. Box 6046, Fredericksburg, VA 22403",
      "started": "2002",
      "district": "88"
    },
    {
      "name": "Collins, Chris",
      "shortname": "cecollins",
      "vote": "Y",
      "party": "R",
      "chamber": "house",
      "address": "117 W. Boscawen Street, Winchester, VA 22601",
      "started": "2016",
      "district": "29"
    },
    {
      "name": "Helsel, Gordon",
      "shortname": "gchelsel",
      "vote": "Y",
      "party": "R",
      "chamber": "house",
      "address": "P. O. Box 2571, Poquoson VA 23662",
      "started": "2011",
      "district": "91"
    },
    {
      "name": "Keam, Mark",
      "shortname": "mlkeam",
      "vote": "Y",
      "party": "D",
      "chamber": "house",
      "address": "P.O. Box 1134, Vienna, VA 22183-1134",
      "started": "2010",
      "district": "35"
    },
    {
      "name": "Landes, Steve",
      "shortname": "rslandes",
      "vote": "Y",
      "party": "R",
      "chamber": "house",
      "address": "P.O. Box 12, Verona, VA 24482",
      "started": "1996",
      "district": "25"
    },
    {
      "name": "LaRock, Dave",
      "shortname": "dalarock",
      "vote": "Y",
      "party": "R",
      "chamber": "house",
      "address": "P.O Box 6\r\nLoudoun, VA 20159",
      "started": "2014",
      "district": "33"
    },
    {
      "name": "Leftwich, Jay",
      "shortname": "jaleftwich",
      "vote": "Y",
      "party": "R",
      "chamber": "house",
      "address": null,
      "started": "2014",
      "district": "78"
    },
    {
      "name": "McGuire, John J.",
      "shortname": "jjmcguire",
      "vote": "Y",
      "party": "R",
      "chamber": "house",
      "address": "11357 Nuckols Road, #156\r\nGlen Allen, VA 23059",
      "started": "2018",
      "district": "56"
    },
    {
      "name": "Pogge, Brenda",
      "shortname": "blpogge",
      "vote": "Y",
      "party": "R",
      "chamber": "house",
      "address": "8412 Down Patrick Highway, Williamsburg, VA 23188",
      "started": "2008",
      "district": "96"
    },
    {
      "name": "Robinson, Roxann",
      "shortname": "rlrobinson",
      "vote": "Y",
      "party": "R",
      "chamber": "house",
      "address": "9409 Hull Street Road, Suite F-1 Rockwood Office Park, Richmond VA 23236",
      "started": "2010",
      "district": "27"
    },
    {
      "name": "Rodman, Debra",
      "shortname": "dhrodman",
      "vote": "Y",
      "party": "D",
      "chamber": "house",
      "address": "6744 Wilber Circle\r\nHenrico, VA 23228",
      "started": "2018",
      "district": "73"
    },
    {
      "name": "VanValkenburg, Schuyler",
      "shortname": "stvanvalkenburg",
      "vote": "Y",
      "party": "D",
      "chamber": "house",
      "address": null,
      "started": "2018",
      "district": "72"
    },
    {
      "name": "Yancey, David",
      "shortname": "deyancey",
      "vote": "Y",
      "party": "R",
      "chamber": "house",
      "address": "P.O. Box 1163, Newport News, VA 23601",
      "started": "2012",
      "district": "94"
    },
    {
      "name": "Davis, Glenn",
      "shortname": "grdavis",
      "vote": "N",
      "party": "R",
      "chamber": "house",
      "address": null,
      "started": "2014",
      "district": "84"
    },
    {
      "name": "Hurst, Chris",
      "shortname": "clhurst",
      "vote": "N",
      "party": "D",
      "chamber": "house",
      "address": "P.O. Box 11389 \r\nBlacksburg, Virginia 24062",
      "started": "2018",
      "district": "12"
    },
    {
      "name": "Turpin, Cheryl",
      "shortname": "cbturpin",
      "vote": "N",
      "party": "D",
      "chamber": "house",
      "address": "\"4540 Princess Anne Road\r\nSuite #114\r\nVirginia Beach, VA 23462\"",
      "started": "2018",
      "district": "85"
    },
    {
      "name": "Tyler, Roslyn",
      "shortname": "rctyler",
      "vote": "N",
      "party": "D",
      "chamber": "house",
      "address": "25359 Blue Star Highway, Jarratt, VA 23867",
      "started": "2006",
      "district": "75"
    }
  ]
}

It remains to add some basic data about both the vote and the bill. Presumably the date of the vote, where the vote was held (e.g., in a committee or a subcommittee), the HTML URL, and basic data about the bill like the number, catchline, and endpoint URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant