getMembershipFromHardLinkedCredential static method
Future<HardLinkedUserMembershipResponse>
getMembershipFromHardLinkedCredential(
- HttpClient client,
- String credential,
- BungieCredentialType crType
Gets any hard linked membership given a credential. Only works for credentials that are public (just SteamID64 right now). Cross Save aware.
Implementation
static Future<HardLinkedUserMembershipResponse> getMembershipFromHardLinkedCredential (
HttpClient client,
String credential,
BungieCredentialType crType,
) async {
final Map<String, dynamic> params = Map<String, dynamic>();
final String _credential = '$credential';
final String _crType = '${crType.value}';
final HttpClientConfig config = HttpClientConfig('GET', '/User/GetMembershipFromHardLinkedCredential/$_crType/$_credential/', params);
config.bodyContentType = null;
final HttpResponse response = await client.request(config);
if(response.statusCode == 200) {
return HardLinkedUserMembershipResponse.asyncFromJson(response.mappedBody);
}
throw Exception(response.mappedBody);
}