mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-19 01:03:56 +00:00
feat: almost finished homescreen (hardcoded).
This commit is contained in:
17
lib/backend/api/github_api.dart
Normal file
17
lib/backend/api/github_api.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
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');
|
||||
}
|
||||
Reference in New Issue
Block a user