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-08-improved-pagination-for-the-repository-commits-api.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,14 @@ created_at: 2014-05-08
5
5
author_name:izuzak
6
6
---
7
7
8
-
The[Repository Commits API](/v3/repos/commits/) now supports an additionalway 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 and will usethese by default when constructing[page links](/v3/#pagination).
8
+
The[Repository Commits API](/v3/repos/commits/) now supports an additionalapproach 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 usesthese parameters by default when constructing[page links](/v3/#pagination).
9
9
10
-
The old way of controlling pagination, using`top`,`last_sha`,and`per_page` parameters, is still supported but 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.
10
+
#Improved resultsandincreased consistency
11
11
12
-
Since both thenewandtheold pagination parameters will be supported until the next version of the API, API clients shouldn't notice any changes today. Still, if you notice any problems with this endpoint, please[let us know](https://github.com/contact?form%5Bsubject%5D=API:+Commits+pagination+changes).
12
+
Thisnewapproach improvesthereliability 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
-
This change improves the reliability of this endpoint, which on rare occasions skipped some commits when paginating repository commit lists. This will also increase the overall consistency of the API because all endpoints now paginate resource lists the same way.
14
+
#Old parameters still supported
15
+
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.
17
+
18
+
Since both the new and the old pagination parameters are still supported in API v3, API clients shouldn't notice any changes today. Still, if you notice any problems with this endpoint, please[let us know](https://github.com/contact?form%5Bsubject%5D=API:+Commits+pagination+improvements).