feat: download latest patches and integrations.

This commit is contained in:
Aunali321 2022-08-02 13:25:01 +05:30
parent d9256149e7
commit 729ad82f77
9 changed files with 59 additions and 55 deletions

View file

@ -3,7 +3,7 @@ import 'package:github/github.dart';
class GithubAPI {
var github = GitHub();
Future latestRelease(String org, repoName) async {
Future<String?> latestRelease(String org, repoName) async {
var latestRelease = await github.repositories
.getLatestRelease(RepositorySlug(org, repoName));
var dlurl = latestRelease.assets
@ -12,7 +12,7 @@ class GithubAPI {
element.browserDownloadUrl!.contains(".apk"))
.browserDownloadUrl;
print(dlurl);
return latestRelease;
return dlurl;
}
Future latestCommitTime(String org, repoName) async {
@ -53,7 +53,7 @@ class GithubAPI {
void main(List<String> args) {
GithubAPI githubAPI = GithubAPI();
// githubAPI.latestRelease('revanced', 'revanced-patches');
githubAPI.latestRelease('revanced', 'revanced-patches');
// githubAPI.latestCommitTime("revanced", "revanced-patches");
// githubAPI.contributors("revanced", "revanced-manager");
}