getAvailableClanFireteams static method

Future<SearchResultOfFireteamSummaryResponse> getAvailableClanFireteams(
  1. HttpClient client,
  2. int activityType,
  3. FireteamDateRange dateRange,
  4. bool excludeImmediate,
  5. String groupId,
  6. String langFilter,
  7. int page,
  8. FireteamPlatform platform,
  9. FireteamPublicSearchOption publicOnly,
  10. FireteamSlotSearch slotFilter,
)

Gets a listing of all of this clan's fireteams that are have available slots. Caller is not checked for join criteria so caching is maximized.

Implementation

static Future<SearchResultOfFireteamSummaryResponse> getAvailableClanFireteams (
    HttpClient client,
    int activityType,
    FireteamDateRange dateRange,
    bool excludeImmediate,
    String groupId,
    String langFilter,
    int page,
    FireteamPlatform platform,
    FireteamPublicSearchOption publicOnly,
    FireteamSlotSearch slotFilter,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _activityType = '$activityType';
    final String _dateRange = '${dateRange.value}';
    final String _groupId = '$groupId';
    final String _page = '$page';
    final String _platform = '${platform.value}';
    final String _publicOnly = '${publicOnly.value}';
    final String _slotFilter = '${slotFilter.value}';
    params['excludeImmediate'] = excludeImmediate;
    params['langFilter'] = langFilter;
    final HttpClientConfig config = HttpClientConfig('GET', '/Fireteam/Clan/$_groupId/Available/$_platform/$_activityType/$_dateRange/$_slotFilter/$_publicOnly/$_page/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return SearchResultOfFireteamSummaryResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}