Skip to content

Mechanism for identifying active members #90

@fowles

Description

@fowles

Consider. https://legislation.nysenate.gov/api/3/members/2022/senate?limit=1000&key=REDACTED

this responds with a large list that contains

{
      "sessionMemberId" : 1864,
      "shortName" : "CLEARE",
      "sessionYear" : 2021,
      "districtCode" : 30,
      "alternate" : false,
      "memberId" : 1504
},

and

{
      "sessionMemberId" : 1798,
      "shortName" : "BENJAMIN",
      "sessionYear" : 2021,
      "districtCode" : 30,
      "alternate" : false,
      "memberId" : 1136
}, 

CLEARE is the active member having replaced BENJAMIN in a special election, but the API does not provide a way of determining that.

Observationally, the memberId and sessionMemberId are larger, which is likely to do with them being handed out in order, but this is not documented anywhere. Ideally, there would be a documented way to determine the active member in cases like this. I propose adding a boolean "active" : true which will be true for the member that is currently serving and false for a member that has been replaced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions