import 'dart:io'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:revanced_manager/constants.dart'; import 'package:revanced_manager/services/github_api.dart'; class ManagerAPI { final GithubAPI _githubAPI = GithubAPI(); Future downloadPatches(String extension) async { return await _githubAPI.latestReleaseFile(extension, ghOrg, patchesRepo); } Future downloadIntegrations(String extension) async { return await _githubAPI.latestReleaseFile( extension, ghOrg, integrationsRepo, ); } Future downloadManager(String extension) async { return await _githubAPI.latestReleaseFile(extension, ghOrg, managerRepo); } Future getLatestPatchesVersion() async { return await _githubAPI.latestReleaseVersion(ghOrg, patchesRepo); } Future getLatestManagerVersion() async { return await _githubAPI.latestReleaseVersion(ghOrg, managerRepo); } Future getCurrentManagerVersion() async { PackageInfo packageInfo = await PackageInfo.fromPlatform(); return packageInfo.version; } Future hasAppUpdates(String packageName) async { // TODO: get status based on last update time on the folder of this app? return true; } Future getAppChangelog(String packageName) async { // TODO: get changelog based on last commits on the folder of this app? return 'to be implemented'; } }