You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2017. It is now read-only.
Copy file name to clipboardExpand all lines: content/changes/2014-05-09-improved-pagination-for-the-repository-commits-api.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ author_name: izuzak
7
7
8
8
The[Repository Commits API](/v3/repos/commits/) now supports an additional approach for paginating[commit lists](/v3/repos/commits/#list-commits-on-a-repository). As of today, this endpoint supports the "standard"[`page` and`per_page` parameters](/v3/#pagination) for controlling pagination. This API now uses these parameters by default when constructing[page links](/v3/#pagination).
9
9
10
-
#Improved results and increased consistency
10
+
##Improved results and increased consistency
11
11
12
12
This new approach improves the reliability of this endpoint, which on rare occasions skipped some commits during pagination. This enhancement also increases the overall consistency of the API, as all endpoints now paginate resource lists the same way.
13
13
14
-
#Old parameters still supported
14
+
##Old parameters still supported
15
15
16
16
The old way of paginating, using`top`,`last_sha`, and`per_page` parameters, is still supported in API v3, but it will be removed in the[next major version of the API](https://developer.github.com/v3/versions/#v3-deprecations). API clients that are manually constructing URLs for pages should be modified to use the new parameters. Even better, API clients shouldn't construct URLs for pages manually, but should use[page links provided by the`Link` header](/guides/traversing-with-pagination/) in API responses.