@@ -215,25 +215,28 @@ class ActivityService extends Service {
215
215
/// Lists people who have starred the specified repo.
216
216
///
217
217
/// API docs: https://developer.github.com/v3/activity/starring/#list-stargazers
218
- Stream <User > listStargazers (RepositorySlug slug) {
218
+ Stream <User > listStargazers (RepositorySlug slug, { int perPage = 30 } ) {
219
219
return PaginationHelper (github).objects ('GET' ,
220
- '/repos/${slug .fullName }/stargazers' , (dynamic i) => User .fromJson (i));
220
+ '/repos/${slug .fullName }/stargazers' , (dynamic i) => User .fromJson (i),
221
+ params: {'per_page' : perPage});
221
222
}
222
223
223
224
/// Lists all the repos starred by a user.
224
225
///
225
226
/// API docs: https://developer.github.com/v3/activity/starring/#list-repositories-being-starred
226
- Stream <Repository > listStarredByUser (String user) {
227
+ Stream <Repository > listStarredByUser (String user, { int perPage = 30 } ) {
227
228
return PaginationHelper (github).objects (
228
- 'GET' , '/users/$user /starred' , (dynamic i) => Repository .fromJson (i));
229
+ 'GET' , '/users/$user /starred' , (dynamic i) => Repository .fromJson (i),
230
+ params: {'per_page' : perPage});
229
231
}
230
232
231
233
/// Lists all the repos by the current user.
232
234
///
233
235
/// API docs: https://developer.github.com/v3/activity/starring/#list-repositories-being-starred
234
- Stream <Repository > listStarred () {
235
- return PaginationHelper (github)
236
- .objects ('GET' , '/user/starred' , (dynamic i) => Repository .fromJson (i));
236
+ Stream <Repository > listStarred ({int perPage = 30 }) {
237
+ return PaginationHelper (github).objects (
238
+ 'GET' , '/user/starred' , (dynamic i) => Repository .fromJson (i),
239
+ params: {'per_page' : perPage});
237
240
}
238
241
239
242
/// Checks if the currently authenticated user has starred the specified repository.
0 commit comments