new CongressHelper()
Helper class for converting and retrieving congress to/from the database
- Source:
Requires:
Requires
Methods
getCongress(congressnullable) → {Promise}
Retrieve a list of congresses either by id or all
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
congress |
number |
<nullable> |
congress number, if none provided then information on all congresses are returned |
- Source:
Returns:
a promise that will resolve with a list of congresses
- Type
- Promise
getCongressMembers(congress) → {Promise}
Retrieve members that belong/attended a given congress
Parameters:
Name | Type | Description |
---|---|---|
congress |
number | congress number to lookup members for |
- Source:
Returns:
a promise that will resolve with a list of members
- Type
- Promise