mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-11 09:30:53 +01:00
28 lines
1 KiB
Dart
28 lines
1 KiB
Dart
|
import 'package:github/github.dart';
|
||
|
import 'package:revanced_manager/services/github_api.dart';
|
||
|
import 'package:stacked/stacked.dart';
|
||
|
|
||
|
class ContributorsViewModel extends BaseViewModel {
|
||
|
final GithubAPI githubAPI = GithubAPI();
|
||
|
List<Contributor> patchesContributors = [];
|
||
|
List<Contributor> integrationsContributors = [];
|
||
|
List<Contributor> patcherContributors = [];
|
||
|
List<Contributor> cliContributors = [];
|
||
|
List<Contributor> managerContributors = [];
|
||
|
|
||
|
Future<List<Contributor>> getContributors() async {
|
||
|
patchesContributors =
|
||
|
await githubAPI.getContributors('revanced', 'revanced-patches');
|
||
|
integrationsContributors =
|
||
|
await githubAPI.getContributors('revanced', 'revanced-integrations');
|
||
|
patcherContributors =
|
||
|
await githubAPI.getContributors('revanced', 'revanced-patcher');
|
||
|
cliContributors =
|
||
|
await githubAPI.getContributors('revanced', 'revanced-cli');
|
||
|
managerContributors =
|
||
|
await githubAPI.getContributors('revanced', 'revanced-manager');
|
||
|
|
||
|
return [];
|
||
|
}
|
||
|
}
|