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() async { return await _githubAPI.latestReleaseFile(ghOrg, patchesRepo); } Future downloadIntegrations() async { return await _githubAPI.latestReleaseFile(ghOrg, integrationsRepo); } Future downloadManager() async { return await _githubAPI.latestReleaseFile( 'Aunali321', 'revanced-manager-flutter', ); } Future getLatestPatchesVersion() async { return await _githubAPI.latestReleaseVersion(ghOrg, patchesRepo); } Future getLatestManagerVersion() async { return await _githubAPI.latestReleaseVersion( 'Aunali321', 'revanced-manager-flutter', ); } 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'; } }