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

Last_vote attribute in Bills JSON endpoint? #177

Closed
mininternet opened this issue Nov 5, 2017 · 8 comments
Closed

Last_vote attribute in Bills JSON endpoint? #177

mininternet opened this issue Nov 5, 2017 · 8 comments
Assignees

Comments

@mininternet
Copy link

Previously with Sunlight there was a last_vote attribute, which was very useful for determining whether to show a Votes button in the UI.

Without a flag now the Votes button will always be displayed, which isn't useful since most bills haven't been voted on, which makes the UI misleading.

Not sure what better way to know when to offer a Votes option, per Bill.

@dwillis
Copy link
Collaborator

dwillis commented Nov 6, 2017

@mininternet: Individual bill responses have a votes attribute that, if not empty, contains a list of votes on that bill, in reverse chronological order (see https://projects.propublica.org/api-docs/congress-api/bills/#get-a-specific-bill). Does that help, or were you looking for something else?

@mininternet
Copy link
Author

@dwillis - Would this be the case for every Bill endpoint, i.e. bills by legislator, bills by subject/search, etc?

Checking for a zero length votes array would work well, but i know there are occasional differences in field structures between endpoints, so not sure if Votes are present everywhere.

@dwillis
Copy link
Collaborator

dwillis commented Nov 6, 2017

@mininternet currently it's only on the Specific Bill endpoint, so no. Sounds like a last_vote attribute or a has_votes boolean would be useful on all bill endpoints? Which would be preferable?

@mininternet
Copy link
Author

@dwillis - With Sunlight it was a last_vote date value, which provided more info than just a boolean. But if this is problematic, a boolean would work well too.

@dwillis
Copy link
Collaborator

dwillis commented Nov 6, 2017

@mininternet it's not problematic. We'll add it to bill responses.

@mininternet
Copy link
Author

Excellent, thanks!

@dwillis dwillis self-assigned this Nov 6, 2017
@dwillis
Copy link
Collaborator

dwillis commented Nov 7, 2017

@mininternet We've added last_vote to bill responses and generally brought more of the bill responses in line with the bill lists responses.

@mininternet
Copy link
Author

@dwillis - Great news, thanks!

I've had a couple of fires to put out, so haven't yet implemented, but will do so by this weekend. Feel free to close this comment.

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

2 participants