getGroupsForMember static method

Future<GetGroupsForMemberResponseResponse> getGroupsForMember(
  1. HttpClient client,
  2. GroupsForMemberFilter filter,
  3. GroupType groupType,
  4. String membershipId,
  5. BungieMembershipType membershipType,
)

Get information about the groups that a given member has joined.

Implementation

static Future<GetGroupsForMemberResponseResponse> getGroupsForMember (
    HttpClient client,
    GroupsForMemberFilter filter,
    GroupType groupType,
    String membershipId,
    BungieMembershipType membershipType,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _filter = '${filter.value}';
    final String _groupType = '${groupType.value}';
    final String _membershipId = '$membershipId';
    final String _membershipType = '${membershipType.value}';
    final HttpClientConfig config = HttpClientConfig('GET', '/GroupV2/User/$_membershipType/$_membershipId/$_filter/$_groupType/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return GetGroupsForMemberResponseResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}