searchPublicAvailableClanFireteams static method
Future<SearchResultOfFireteamSummaryResponse>
searchPublicAvailableClanFireteams(
- HttpClient client,
- int activityType,
- FireteamDateRange dateRange,
- String langFilter,
- int page,
- FireteamPlatform platform,
- 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,
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['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);
}