searchPublicAvailableClanFireteams static method

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

Gets a listing of all public fireteams starting now with open slots. Caller is not checked for join criteria so caching is maximized.

Implementation

static Future<SearchResultOfFireteamSummaryResponse> searchPublicAvailableClanFireteams (
    HttpClient client,
    int activityType,
    FireteamDateRange dateRange,
    bool excludeImmediate,
    String langFilter,
    int page,
    FireteamPlatform platform,
    FireteamSlotSearch slotFilter,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _activityType = '$activityType';
    final String _dateRange = '${dateRange.value}';
    final String _page = '$page';
    final String _platform = '${platform.value}';
    final String _slotFilter = '${slotFilter.value}';
    params['excludeImmediate'] = excludeImmediate;
    params['langFilter'] = langFilter;
    final HttpClientConfig config = HttpClientConfig('GET', '/Fireteam/Search/Available/$_platform/$_activityType/$_dateRange/$_slotFilter/$_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);
}