getGameAccounts function

Future getGameAccounts({
  1. bool chinese = false,
})

Implementation

Future getGameAccounts({bool chinese = false}) async {
  var url = 'https://api-os-takumi.hoyoverse.com/';
  if (chinese) {
    url = 'https://api-takumi.mihoyo.com/';
  }
  var data = await fetchEndpoint('${url}binding/api/getUserGameRolesByCookie');

  return prettifyGameAccounts(data['list']);
}