feat: working resource patching

This commit is contained in:
Alberto Ponces
2022-08-19 19:13:43 +01:00
parent e373aef2d9
commit 4b2806c519
8 changed files with 107 additions and 64 deletions

View File

@@ -6,30 +6,28 @@ import 'package:revanced_manager/services/github_api.dart';
class ManagerAPI {
final GithubAPI _githubAPI = GithubAPI();
Future<File?> downloadPatches() async {
return await _githubAPI.latestReleaseFile(ghOrg, patchesRepo);
Future<File?> downloadPatches(String extension) async {
return await _githubAPI.latestReleaseFile(extension, ghOrg, patchesRepo);
}
Future<File?> downloadIntegrations() async {
return await _githubAPI.latestReleaseFile(ghOrg, integrationsRepo);
}
Future<File?> downloadManager() async {
Future<File?> downloadIntegrations(String extension) async {
return await _githubAPI.latestReleaseFile(
'Aunali321',
'revanced-manager-flutter',
extension,
ghOrg,
integrationsRepo,
);
}
Future<File?> downloadManager(String extension) async {
return await _githubAPI.latestReleaseFile(extension, ghOrg, managerRepo);
}
Future<String?> getLatestPatchesVersion() async {
return await _githubAPI.latestReleaseVersion(ghOrg, patchesRepo);
}
Future<String?> getLatestManagerVersion() async {
return await _githubAPI.latestReleaseVersion(
'Aunali321',
'revanced-manager-flutter',
);
return await _githubAPI.latestReleaseVersion(ghOrg, managerRepo);
}
Future<String> getCurrentManagerVersion() async {