Update checking improvements (#38)

Still no auto retry for rate-limit. Instead, rate-limit errors are ignored and the unchecked Apps have to wait until the next cycle. Even this needs more testing before release.
This commit is contained in:
Imran Remtulla
2022-09-27 23:20:39 -04:00
committed by GitHub
parent 77e1768f3b
commit dd193d62f2
10 changed files with 185 additions and 90 deletions

View File

@@ -15,8 +15,8 @@ class GitHubStars implements MassAppSource {
if (args.length != requiredArgs.length) {
throw 'Wrong number of arguments provided';
}
Response res =
await get(Uri.parse('https://api.github.com/users/${args[0]}/starred'));
Response res = await get(Uri.parse(
'https://api.github.com/users/${args[0]}/starred?per_page=100')); //TODO: Make requests for more pages until you run out
if (res.statusCode == 200) {
return (jsonDecode(res.body) as List<dynamic>)
.map((e) => e['html_url'] as String)