Skip to content

Commit

Permalink
Include legislator activity in the API response
Browse files Browse the repository at this point in the history
  • Loading branch information
waldoj committed Feb 11, 2024
1 parent 0554165 commit 03f9f7f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions htdocs/1.1/legislator.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@
}
}

# Create a new statistics object.
$stats = new Statistics();
$activity = $stats->legislator_activity($legislator['id']);
if ($activity !== false) {
$legislator['activity'] = $activity;
}

# We publicly call the shortname the "ID," so swap them out.
$legislator['rs_id'] = $legislator['id'];
$legislator['id'] = $legislator['shortname'];
Expand Down

0 comments on commit 03f9f7f

Please sign in to comment.