votesmart / python-votesmart

python client library for interacting with Project Vote Smart API
Other
84 stars 40 forks source link

Candidates class getByElection() method not does not allow for `stageId` parameter #18

Open highplainsjames opened 6 years ago

highplainsjames commented 6 years ago

Based on the documentation for votesmart the Candidates.getByElection() method provides for a stageId parameter value that filters results based on the election stage:

Candidates.getByElection()
This method grabs a list of candidates according to the election they are running in.

Input: electionId*, stageId

However, the current python candidates class method getByElection() does not provide for a stageId parameter to be passed in as an argument:

https://github.com/votesmart/python-votesmart/blob/master/votesmart.py#L301

Instead it only provides for the electionId. So, presently there is no way to filter candidate values by election stage.

highplainsjames commented 6 years ago

I've provided a PR for this issue:

https://github.com/votesmart/python-votesmart/pull/19