Skip to content

Commit

Permalink
Merge pull request cloudflare#29 from crlorentzen/patch-1
Browse files Browse the repository at this point in the history
Fix Pagination in example raw code
  • Loading branch information
mahtin authored Aug 22, 2017
2 parents 9926050 + c842b04 commit 152c9a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def main():
cf = CloudFlare.CloudFlare(raw=True)
page_number = 0
while True:
page_number += 1
raw_results = cf.zones.get(params={'per_page':5,'page':page_number})
zones = raw_results['result']

Expand All @@ -112,7 +113,6 @@ def main():
print zone_id, zone_name

total_pages = raw_results['result_info']['total_pages']
page_number += 1
if page_number == total_pages:
break

Expand Down

0 comments on commit 152c9a1

Please sign in to comment.