File tree Expand file tree Collapse file tree 5 files changed +8
-9
lines changed Expand file tree Collapse file tree 5 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1
- ## 9.25.0-wip
1
+ ## 9.25.0
2
2
3
3
* Require Dart 3.5
4
4
* Require ` package:http ` ` ^1.0.0 ` .
5
+ * Fix pagination logic to use ` next ` link.
5
6
6
7
## 9.24.0
7
8
Original file line number Diff line number Diff line change @@ -28,9 +28,6 @@ class PaginationHelper {
28
28
params = Map .from (params);
29
29
}
30
30
31
- var page = params['page' ] ?? 1 ;
32
- params['page' ] = page;
33
-
34
31
while (true ) {
35
32
http.Response response;
36
33
try {
@@ -70,7 +67,8 @@ class PaginationHelper {
70
67
break ;
71
68
}
72
69
73
- params['page' ] = ++ page;
70
+ path = next;
71
+ params = null ;
74
72
}
75
73
}
76
74
Original file line number Diff line number Diff line change 1
1
name : github
2
- version : 9.25.0-wip
2
+ version : 9.25.0
3
3
description : A high-level GitHub API Client Library that uses Github's v3 API
4
4
homepage : https://github.com/SpinlockLabs/github.dart
5
5
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ void main() {
16
16
test ('listCommits' , () async {
17
17
final repositories = create ((request) async {
18
18
expect (request.url.path, '/repos/${slug .fullName }/commits' );
19
- expect (request.url.query, 'page=1' );
19
+ expect (request.url.query, isEmpty );
20
20
21
21
return Response (listCommits, StatusCodes .OK );
22
22
});
@@ -29,7 +29,7 @@ void main() {
29
29
expect (request.url.path, '/repos/${slug .fullName }/commits' );
30
30
expect (
31
31
request.url.query,
32
- 'author=octocat&committer=octodog&sha=abc&path=%2Fpath&since=2022-02-22T00%3A00%3A00.000&until=2023-02-22T00%3A00%3A00.000&page=1 ' ,
32
+ 'author=octocat&committer=octodog&sha=abc&path=%2Fpath&since=2022-02-22T00%3A00%3A00.000&until=2023-02-22T00%3A00%3A00.000' ,
33
33
);
34
34
return Response (listCommits, StatusCodes .OK );
35
35
});
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ void main() {
172
172
test ('code search' , () async {
173
173
nock (fakeApiUrl)
174
174
.get (
175
- '/search/code?q=search%20repo%3ASpinlockLabs%2Fgithub.dart%20in%3Afile&per_page=20&page=1 ' )
175
+ '/search/code?q=search%20repo%3ASpinlockLabs%2Fgithub.dart%20in%3Afile&per_page=20' )
176
176
.reply (200 , nocked.searchResults);
177
177
178
178
final results = (await github.search
You can’t perform that action at this time.
0 commit comments