TeamsServiceDio class abstract

Access and manage Lichess teams and their members.

https://lichess.org/api#tag/Teams

Implemented types
Annotations
  • @RestApi()

Constructors

TeamsServiceDio(Dio dio)
factory
TeamsServiceDio.create({String? accessToken, String baseUrl = 'https://lichess.org'})
factory

Properties

dio → Dio
Dio client linked with this service instance.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

acceptJoinRequest({required String teamId, required String userId}) Future<void>
Accept a join request for a team based on the given teamId and userId.
override
close({bool force = false}) Future<void>
Close the dio instance associated with this service instance.
override
declineJoinRequest({required String teamId, required String userId}) Future<void>
Decline a join request for a team based on the given teamId and userId.
override
getById(String teamId) Future<Team>
Get the team based on the given teamId.
override
getByUser({required String username}) Future<List<Team>>
Get all teams of a user based on the given username.
override
getJoinRequests({required String teamId}) Future<List<JoinRequest>>
Get pending join requests for a team based on the given teamId.
override
getMembers({required String teamId}) Stream<User>
Get all members of a team based on the given teamId.
override
getPopular({int page = 1}) Future<PageOf<Team>>
Paginator of the most popular teams.
override
join({required String teamId, String? message, String? password}) Future<void>
Join a team based on the given teamId. An optional message can be provided to send a message if the team requires one.
override
kickMember({required String teamId, required String userId}) Future<void>
Kick a user from a team based on the given teamId and userId.
override
leave({required String teamId}) Future<void>
Leave a team based on the given teamId.
override
messageAllMembers({required String teamId, required String message}) Future<void>
Send a privatte message to all members of a team.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
Search for teams based on the given name. An optional page index can be provided to get a specific page.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited