congress-api-docs icon indicating copy to clipboard operation
congress-api-docs copied to clipboard

Inconsistent presence and names of title/role fields

Open konklone opened this issue 8 years ago • 3 comments

On the state/district member endpoint, it uses role where other endpoints for members use title. It would be nice if these were consistent.

konklone avatar Jul 16 '17 22:07 konklone

To broaden this a bit: the Lists of members endpoint seems to have neither a title nor a role field:

https://projects.propublica.org/api-docs/congress-api/endpoints/#lists-of-members

While one may have the chamber on-hand in the client (because it was made a URL parameter), this isn't sufficient to distinguish Representatives from Delegates from Resident Commissioners.

konklone avatar Jul 16 '17 22:07 konklone

Yeah, the inability to filter out Delegates/RCs/etc. from Representatives is biting me hard on a project I'm working on. With the old Sunlight API it was possible to look at the title field in the results to make that happen. Not sure what the value is of not having the lists-of-members endpoint include it.

I guess I could get the same results by taking each member in the list and doing an individual request to get all their data, but that would make building a complete list of Representatives something that takes 445 requests (!) rather than one...

jalefkowit avatar Sep 27 '17 20:09 jalefkowit

I think we can add it, but in terms of filtering those folks out, you can do so by state, excluding the following values: PR, DC, VI, MP, GU, AS.

dwillis avatar Sep 27 '17 20:09 dwillis