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.
Consider. https://legislation.nysenate.gov/api/3/members/2022/senate?limit=1000&key=REDACTED
this responds with a large list that contains
and
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
memberIdandsessionMemberIdare 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" : truewhich will be true for the member that is currently serving andfalsefor a member that has been replaced.