getUserClanInviteSetting static method

Future<BooleanResponse> getUserClanInviteSetting(
  1. HttpClient client,
  2. BungieMembershipType mType
)

Gets the state of the user's clan invite preferences for a particular membership type - true if they wish to be invited to clans, false otherwise.

Implementation

static Future<BooleanResponse> getUserClanInviteSetting (
    HttpClient client,
    BungieMembershipType mType,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _mType = '${mType.value}';
    final HttpClientConfig config = HttpClientConfig('GET', '/GroupV2/GetUserClanInviteSetting/$_mType/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return BooleanResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}