Skip to content

Commit

Permalink
Fixed request.json to match request version
Browse files Browse the repository at this point in the history
  • Loading branch information
adieyal committed Nov 24, 2013
1 parent 005bb6e commit a1ed50c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def _paginate(self, url, params=None):
url = self.base_url + "/" + url
while url:
r = requests.get(url, params=params)
js = r.json
js = r.json()
for result in js["results"]:
yield result
url = js["next"]
Expand Down Expand Up @@ -48,3 +48,6 @@ def resultsummaries(self, **kwargs):
#print list(iec.voting_districts(ward="41602001"))
#print list(iec.results(ward="41602001"))
print list(iec.resultsummaries(ward="41602001"))
#for summary in iec.resultsummaries(province="Gauteng"):
# print summary["voting_district"], summary["voter_turnout_perc"]

0 comments on commit a1ed50c

Please sign in to comment.