revanced-manager/lib/backend/api/github_api.dart
2022-08-01 01:16:27 +05:30

18 lines
452 B
Dart

import 'package:github/github.dart';
class GithubAPI {
var github = GitHub();
Future latestRelease(String org, repoName) async {
var latestRelease = await github.repositories
.getLatestRelease(RepositorySlug(org, repoName));
var dlurl = latestRelease.assets?.first.browserDownloadUrl;
print(dlurl);
return latestRelease;
}
}
void main(List<String> args) {
GithubAPI().latestRelease('revanced', 'revanced-patches');
}