Use the new hosting service paginators for get_remote_repositories.
Review Request #5886 — Created May 28, 2014 and submitted
get_remote_repositories
is now designed to support pagination, making
use of the new paginator classes. When callingget_remote_repositories
,
the caller will get back anAPIPaginator
subclass that can be used to
paginate through all results.The function also now takes a starting page for the pagination, and a
requested number of results per page.This will make it easier to write web API that interfaces with
get_remote_repositories
, allowing pagination to occur as expected by
callers.Right now, only GitHub supports this function, so it's the only one that
is affected.
Unit tests passed.
Tested this by hand in the shell. Paginated back and forth between results.
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/hostingsvcs/github.py reviewboard/hostingsvcs/tests.py reviewboard/hostingsvcs/service.py Ignored Files:
- Change Summary:
-
- Fixed
get_remote_repositories
to accept the pagination arguments and pass them down. - Normalized the
start
value to use 1-based pages instead of 0-based for GitHub.
- Fixed
- Commit:
-
b498161a65f2cd20ca27b41b0f0ab2c308c3c5d1009f7711d28384c653a8d374b747dc7d5e2272a2
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/hostingsvcs/github.py reviewboard/hostingsvcs/tests.py reviewboard/hostingsvcs/service.py Ignored Files: