listTournaments method
Future<TournamentList>
listTournaments({
- required Session session,
- int? categoryStart,
- int? categoryEnd,
- String? cursor,
- DateTime? startTime,
- DateTime? endTime,
- int limit = defaultLimit,
override
Listing tournaments
Players can list and filter tournaments with various criteria.
Implementation
@override
Future<model.TournamentList> listTournaments({
required model.Session session,
int? categoryStart,
int? categoryEnd,
String? cursor,
DateTime? startTime,
DateTime? endTime,
int limit = defaultLimit,
}) async {
final res = await _client.listTournaments(
api.ListTournamentsRequest(
categoryEnd: api.UInt32Value(value: categoryEnd),
categoryStart: api.UInt32Value(value: categoryStart),
cursor: cursor,
startTime: api.UInt32Value(value: startTime != null ? startTime.millisecondsSinceEpoch ~/ 1000 : null),
endTime: api.UInt32Value(value: endTime != null ? endTime.millisecondsSinceEpoch ~/ 1000 : null),
limit: api.Int32Value(value: limit),
),
options: _getSessionCallOptions(session),
);
return model.TournamentList.fromDto(res);
}