Api class

Implementers

Constructors

Api({Client? httpClient, Uri? baseUri, String? bearerToken})

Properties

baseUri Uri?
getter/setter pair
bearerToken String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
httpClient ↔ Client
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add3PID(String clientSecret, String sid, {AuthenticationData? auth}) Future<void>
This API endpoint uses the User-Interactive Authentication API.
ban(String roomId, String userId, {String? reason}) Future<void>
Ban a user in the room. If the user is currently in the room, also kick them.
bind3PID(String clientSecret, String idAccessToken, String idServer, String sid) Future<void>
Binds a 3PID to the user's account through the specified identity server.
bodySizeExceeded(int expected, int actual) → Never
changePassword(String newPassword, {AuthenticationData? auth, bool? logoutDevices}) Future<void>
Changes the password for an account on this homeserver.
checkUsernameAvailability(String username) Future<bool?>
Checks to see if a username is available, and valid, for the server.
claimKeys(Map<String, Map<String, String>> oneTimeKeys, {int? timeout}) Future<ClaimKeysResponse>
Claims one-time keys for use in pre-key messages.
createContent() Future<CreateContentResponse>
Creates a new mxc:// URI, independently of the content being uploaded. The content must be provided later via PUT /_matrix/media/v3/upload/{serverName}/{mediaId}.
createRoom({Map<String, Object?>? creationContent, List<StateEvent>? initialState, List<String>? invite, List<Invite3pid>? invite3pid, bool? isDirect, String? name, Map<String, Object?>? powerLevelContentOverride, CreateRoomPreset? preset, String? roomAliasName, String? roomVersion, String? topic, Visibility? visibility}) Future<String>
Create a new room with various configuration options.
deactivateAccount({AuthenticationData? auth, bool? erase, String? idServer}) Future<IdServerUnbindResult>
Deactivate the user's account, removing all ability for the user to login again.
defineFilter(String userId, Filter body) Future<String>
Uploads a new filter definition to the homeserver. Returns a filter ID that may be used in future requests to restrict which events are returned to the client.
delete3pidFromAccount(String address, ThirdPartyIdentifierMedium medium, {String? idServer}) Future<IdServerUnbindResult>
Removes a third-party identifier from the user's account. This might not cause an unbind of the identifier from the identity server.
deleteDevice(String deviceId, {AuthenticationData? auth}) Future<void>
This API endpoint uses the User-Interactive Authentication API.
deleteDevices(List<String> devices, {AuthenticationData? auth}) Future<void>
This API endpoint uses the User-Interactive Authentication API.
deletePushRule(PushRuleKind kind, String ruleId) Future<void>
This endpoint removes the push rule defined in the path.
deleteRoomAlias(String roomAlias) Future<void>
Remove a mapping of room alias to room ID.
deleteRoomKeyBySessionId(String roomId, String sessionId, String version) Future<RoomKeysUpdateResponse>
Delete a key from the backup.
deleteRoomKeys(String version) Future<RoomKeysUpdateResponse>
Delete the keys from the backup.
deleteRoomKeysByRoomId(String roomId, String version) Future<RoomKeysUpdateResponse>
Delete the keys from the backup for a given room.
deleteRoomKeysVersion(String version) Future<void>
Delete an existing key backup. Both the information about the backup, as well as all key data related to the backup will be deleted.
deleteRoomTag(String userId, String roomId, String tag) Future<void>
Remove a tag from the room.
forgetRoom(String roomId) Future<void>
This API stops a user remembering about a particular room.
generateLoginToken({AuthenticationData? auth}) Future<GenerateLoginTokenResponse>
Optional endpoint - the server is not required to implement this endpoint if it does not intend to use or support this functionality.
getAccount3PIDs() Future<List<ThirdPartyIdentifier>?>
Gets a list of the third-party identifiers that the homeserver has associated with the user's account.
getAccountData(String userId, String type) Future<Map<String, Object?>>
Get some account data for the client. This config is only visible to the user that set the account data.
getAccountDataPerRoom(String userId, String roomId, String type) Future<Map<String, Object?>>
Get some account data for the client on a given room. This config is only visible to the user that set the account data.
getAvatarUrl(String userId) Future<Uri?>
Get the user's avatar URL. This API may be used to fetch the user's own avatar URL or to query the URL of other users; either locally or on remote homeservers.
getCapabilities() Future<Capabilities>
Gets information about the server's supported feature set and other relevant capabilities.
getConfig() Future<MediaConfig>
{{% boxes/note %}} Replaced by GET /_matrix/client/v1/media/config. {{% /boxes/note %}}
getConfigAuthed() Future<MediaConfig>
This endpoint allows clients to retrieve the configuration of the content repository, such as upload limitations. Clients SHOULD use this as a guide when using content repository endpoints. All values are intentionally left optional. Clients SHOULD follow the advice given in the field description when the field is not available.
getContent(String serverName, String mediaId, {bool? allowRemote, int? timeoutMs, bool? allowRedirect}) Future<FileResponse>
{{% boxes/note %}} Replaced by GET /_matrix/client/v1/media/download/{serverName}/{mediaId} (requires authentication). {{% /boxes/note %}}
getContentAuthed(String serverName, String mediaId, {int? timeoutMs}) Future<FileResponse>
{{% boxes/note %}} Clients SHOULD NOT generate or use URLs which supply the access token in the query string. These URLs may be copied by users verbatim and provided in a chat message to another user, disclosing the sender's access token. {{% /boxes/note %}}
getContentOverrideName(String serverName, String mediaId, String fileName, {bool? allowRemote, int? timeoutMs, bool? allowRedirect}) Future<FileResponse>
{{% boxes/note %}} Replaced by GET /_matrix/client/v1/media/download/{serverName}/{mediaId}/{fileName} (requires authentication). {{% /boxes/note %}}
getContentOverrideNameAuthed(String serverName, String mediaId, String fileName, {int? timeoutMs}) Future<FileResponse>
This will download content from the content repository (same as the previous endpoint) but replaces the target file name with the one provided by the caller.
getContentThumbnail(String serverName, String mediaId, int width, int height, {Method? method, bool? allowRemote, int? timeoutMs, bool? allowRedirect, bool? animated}) Future<FileResponse>
{{% boxes/note %}} Replaced by GET /_matrix/client/v1/media/thumbnail/{serverName}/{mediaId} (requires authentication). {{% /boxes/note %}}
getContentThumbnailAuthed(String serverName, String mediaId, int width, int height, {Method? method, int? timeoutMs, bool? animated}) Future<FileResponse>
Download a thumbnail of content from the content repository. See the Thumbnails section for more information.
getDevice(String deviceId) Future<Device>
Gets information on a single device, by device id.
getDevices() Future<List<Device>?>
Gets information about all devices for the current user.
getDisplayName(String userId) Future<String?>
Get the user's display name. This API may be used to fetch the user's own displayname or to query the name of other users; either locally or on remote homeservers.
getEventByTimestamp(String roomId, int ts, Direction dir) Future<GetEventByTimestampResponse>
Get the ID of the event closest to the given timestamp, in the direction specified by the dir parameter.
getEventContext(String roomId, String eventId, {int? limit, String? filter}) Future<EventContext>
This API returns a number of events that happened just before and after the specified event. This allows clients to get the context surrounding an event.
getEvents({String? from, int? timeout}) Future<GetEventsResponse>
This will listen for new events and return them to the caller. This will block until an event is received, or until the timeout is reached.
getFilter(String userId, String filterId) Future<Filter>
userId The user ID to download a filter for.
getJoinedMembersByRoom(String roomId) Future<Map<String, RoomMember>?>
This API returns a map of MXIDs to member info objects for members of the room. The current user must be in the room for it to work, unless it is an Application Service in which case any of the AS's users must be in the room. This API is primarily for Application Services and should be faster to respond than /members as it can be implemented more efficiently on the server.
getJoinedRooms() Future<List<String>>
This API returns a list of the user's current rooms.
getKeysChanges(String from, String to) Future<GetKeysChangesResponse>
Gets a list of users who have updated their device identity keys since a previous sync token.
getLocalAliases(String roomId) Future<List<String>>
Get a list of aliases maintained by the local server for the given room.
getLoginFlows() Future<List<LoginFlow>?>
Gets the homeserver's supported login types to authenticate users. Clients should pick one of these and supply it as the type when logging in.
getMembersByRoom(String roomId, {String? at, Membership? membership, Membership? notMembership}) Future<List<MatrixEvent>?>
Get the list of members for this room.
getNotifications({String? from, int? limit, String? only}) Future<GetNotificationsResponse>
This API is used to paginate through the list of events that the user has been, or would have been notified about.
getOneEvent(String eventId) Future<MatrixEvent>
Get a single event based on event_id. You must have permission to retrieve this event e.g. by being a member in the room for this event.
getOneRoomEvent(String roomId, String eventId) Future<MatrixEvent>
Get a single event based on roomId/eventId. You must have permission to retrieve this event e.g. by being a member in the room for this event.
getPresence(String userId) Future<GetPresenceResponse>
Get the given user's presence state.
getProtocolMetadata(String protocol) Future<Protocol>
Fetches the metadata from the homeserver about a particular third-party protocol.
getProtocols() Future<Map<String, Protocol>>
Fetches the overall metadata about protocols supported by the homeserver. Includes both the available protocols and all fields required for queries against each protocol.
getPublicRooms({int? limit, String? since, String? server}) Future<GetPublicRoomsResponse>
Lists the public rooms on the server.
getPushers() Future<List<Pusher>?>
Gets all currently active pushers for the authenticated user.
getPushRule(PushRuleKind kind, String ruleId) Future<PushRule>
Retrieve a single specified push rule.
getPushRuleActions(PushRuleKind kind, String ruleId) Future<List<Object?>>
This endpoint get the actions for the specified push rule.
getPushRules() Future<PushRuleSet>
Retrieve all push rulesets for this user. Currently the only push ruleset defined is global.
getPushRulesGlobal() Future<GetPushRulesGlobalResponse>
Retrieve all push rules for this user.
getRelatingEvents(String roomId, String eventId, {String? from, String? to, int? limit, Direction? dir, bool? recurse}) Future<GetRelatingEventsResponse>
Retrieve all of the child events for a given parent event.
getRelatingEventsWithRelType(String roomId, String eventId, String relType, {String? from, String? to, int? limit, Direction? dir, bool? recurse}) Future<GetRelatingEventsWithRelTypeResponse>
Retrieve all of the child events for a given parent event which relate to the parent using the given relType.
getRelatingEventsWithRelTypeAndEventType(String roomId, String eventId, String relType, String eventType, {String? from, String? to, int? limit, Direction? dir, bool? recurse}) Future<GetRelatingEventsWithRelTypeAndEventTypeResponse>
Retrieve all of the child events for a given parent event which relate to the parent using the given relType and have the given eventType.
getRoomEvents(String roomId, Direction dir, {String? from, String? to, int? limit, String? filter}) Future<GetRoomEventsResponse>
This API returns a list of message and state events for a room. It uses pagination query parameters to paginate history in the room.
getRoomIdByAlias(String roomAlias) Future<GetRoomIdByAliasResponse>
Requests that the server resolve a room alias to a room ID.
getRoomKeyBySessionId(String roomId, String sessionId, String version) Future<KeyBackupData>
Retrieve a key from the backup.
getRoomKeys(String version) Future<RoomKeys>
Retrieve the keys from the backup.
getRoomKeysByRoomId(String roomId, String version) Future<RoomKeyBackup>
Retrieve the keys from the backup for a given room.
getRoomKeysVersion(String version) Future<GetRoomKeysVersionResponse>
Get information about an existing backup.
getRoomKeysVersionCurrent() Future<GetRoomKeysVersionCurrentResponse>
Get information about the latest backup version.
getRoomState(String roomId) Future<List<MatrixEvent>>
Get the state events for the current state of a room.
getRoomStateWithKey(String roomId, String eventType, String stateKey) Future<Map<String, Object?>>
Looks up the contents of a state event in a room. If the user is joined to the room then the state is taken from the current state of the room. If the user has left the room then the state is taken from the state of the room when they left.
getRoomTags(String userId, String roomId) Future<Map<String, Tag>?>
List the tags set by a user on a room.
getRoomVisibilityOnDirectory(String roomId) Future<Visibility?>
Gets the visibility of a given room on the server's public room directory.
getSpaceHierarchy(String roomId, {bool? suggestedOnly, int? limit, int? maxDepth, String? from}) Future<GetSpaceHierarchyResponse>
Paginates over the space tree in a depth-first manner to locate child rooms of a given space.
getThreadRoots(String roomId, {Include? include, int? limit, String? from}) Future<GetThreadRootsResponse>
This API is used to paginate through the list of the thread roots in a given room.
getTokenOwner() Future<TokenOwnerInfo>
Gets information about the owner of a given access token.
getTurnServer() Future<TurnServerCredentials>
This API provides credentials for the client to use when initiating calls.
getUrlPreview(Uri url, {int? ts}) Future<PreviewForUrl>
{{% boxes/note %}} Replaced by GET /_matrix/client/v1/media/preview_url. {{% /boxes/note %}}
getUrlPreviewAuthed(Uri url, {int? ts}) Future<PreviewForUrl>
Get information about a URL for the client. Typically this is called when a client sees a URL in a message and wants to render a preview for the user.
getUserProfile(String userId) Future<ProfileInformation>
Get the combined profile information for this user. This API may be used to fetch the user's own profile information or other users; either locally or on remote homeservers.
getVersions() Future<GetVersionsResponse>
Gets the versions of the specification supported by the server.
getWellknown() Future<DiscoveryInformation>
Gets discovery information about the domain. The file may include additional keys, which MUST follow the Java package naming convention, e.g. com.example.myapp.property. This ensures property names are suitably namespaced for each application and reduces the risk of clashes.
getWellknownSupport() Future<GetWellknownSupportResponse>
Gets server admin contact and support page of the domain.
getWhoIs(String userId) Future<WhoIsInfo>
Gets information about a particular user.
inviteBy3PID(String roomId, String address, String idAccessToken, String idServer, String medium) Future<void>
Note that there are two forms of this API, which are documented separately. This version of the API does not require that the inviter know the Matrix identifier of the invitee, and instead relies on third-party identifiers. The homeserver uses an identity server to perform the mapping from third-party identifier to a Matrix identifier. The other is documented in the joining rooms section.
inviteUser(String roomId, String userId, {String? reason}) Future<void>
Note that there are two forms of this API, which are documented separately. This version of the API requires that the inviter knows the Matrix identifier of the invitee. The other is documented in the third-party invites section.
isPushRuleEnabled(PushRuleKind kind, String ruleId) Future<bool>
This endpoint gets whether the specified push rule is enabled.
joinRoom(String roomIdOrAlias, {List<String>? serverName, List<String>? via, String? reason, ThirdPartySigned? thirdPartySigned}) Future<String>
Note that this API takes either a room ID or alias, unlike /rooms/{roomId}/join.
joinRoomById(String roomId, {String? reason, ThirdPartySigned? thirdPartySigned}) Future<String>
Note that this API requires a room ID, not alias. /join/{roomIdOrAlias} exists if you have a room alias.
kick(String roomId, String userId, {String? reason}) Future<void>
Kick a user from the room.
knockRoom(String roomIdOrAlias, {List<String>? serverName, List<String>? via, String? reason}) Future<String>
Note that this API takes either a room ID or alias, unlike other membership APIs.
leaveRoom(String roomId, {String? reason}) Future<void>
This API stops a user participating in a particular room.
login(String type, {String? address, String? deviceId, AuthenticationIdentifier? identifier, String? initialDeviceDisplayName, String? medium, String? password, bool? refreshToken, String? token, String? user}) Future<LoginResponse>
Authenticates the user, and issues an access token they can use to authorize themself in subsequent requests.
logout() Future<void>
Invalidates an existing access token, so that it can no longer be used for authorization. The device associated with the access token is also deleted. Device keys for the device are deleted alongside the device.
logoutAll() Future<void>
Invalidates all access tokens for a user, so that they can no longer be used for authorization. This includes the access token that made this request. All devices for the user are also deleted. Device keys for the device are deleted alongside the device.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peekEvents({String? from, int? timeout, String? roomId}) Future<PeekEventsResponse>
This will listen for new events related to a particular room and return them to the caller. This will block until an event is received, or until the timeout is reached.
pingAppservice(String appserviceId, {String? transactionId}) Future<int>
This API asks the homeserver to call the /_matrix/app/v1/ping endpoint on the application service to ensure that the homeserver can communicate with the application service.
post3PIDs(ThreePidCredentials threePidCreds) Future<Uri?>
Adds contact information to the user's account.
postReceipt(String roomId, ReceiptType receiptType, String eventId, {String? threadId}) Future<void>
This API updates the marker for the given receipt type to the event ID specified.
postRoomKeysVersion(BackupAlgorithm algorithm, Map<String, Object?> authData) Future<String>
Creates a new backup.
putRoomKeyBySessionId(String roomId, String sessionId, String version, KeyBackupData body) Future<RoomKeysUpdateResponse>
Store a key in the backup.
putRoomKeys(String version, RoomKeys body) Future<RoomKeysUpdateResponse>
Store several keys in the backup.
putRoomKeysByRoomId(String roomId, String version, RoomKeyBackup body) Future<RoomKeysUpdateResponse>
Store several keys in the backup for a given room.
putRoomKeysVersion(String version, BackupAlgorithm algorithm, Map<String, Object?> authData) Future<Map<String, Object?>>
Update information about an existing backup. Only auth_data can be modified.
queryKeys(Map<String, List<String>> deviceKeys, {int? timeout}) Future<QueryKeysResponse>
Returns the current devices and identity keys for the given users.
queryLocationByAlias(String alias) Future<List<Location>>
Retrieve an array of third-party network locations from a Matrix room alias.
queryLocationByProtocol(String protocol, {Map<String, String>? fields}) Future<List<Location>>
Requesting this endpoint with a valid protocol name results in a list of successful mapping results in a JSON array. Each result contains objects to represent the Matrix room or rooms that represent a portal to this third-party network. Each has the Matrix room alias string, an identifier for the particular third-party network protocol, and an object containing the network-specific fields that comprise this identifier. It should attempt to canonicalise the identifier as much as reasonably possible given the network type.
queryPublicRooms({String? server, PublicRoomQueryFilter? filter, bool? includeAllNetworks, int? limit, String? since, String? thirdPartyInstanceId}) Future<QueryPublicRoomsResponse>
Lists the public rooms on the server, with optional filter.
queryUserByID(String userid) Future<List<ThirdPartyUser>>
Retrieve an array of third-party users from a Matrix User ID.
queryUserByProtocol(String protocol, {Map<String, String>? fields}) Future<List<ThirdPartyUser>>
Retrieve a Matrix User ID linked to a user on the third-party service, given a set of user parameters.
redactEvent(String roomId, String eventId, String txnId, {String? reason}) Future<String?>
Strips all information out of an event which isn't critical to the integrity of the server-side representation of the room.
refresh(String refreshToken) Future<RefreshResponse>
Refresh an access token. Clients should use the returned access token when making subsequent API calls, and store the returned refresh token (if given) in order to refresh the new access token when necessary.
register({AccountKind? kind, AuthenticationData? auth, String? deviceId, bool? inhibitLogin, String? initialDeviceDisplayName, String? password, bool? refreshToken, String? username}) Future<RegisterResponse>
This API endpoint uses the User-Interactive Authentication API, except in the cases where a guest account is being registered.
registrationTokenValidity(String token) Future<bool>
Queries the server to determine if a given registration token is still valid at the time of request. This is a point-in-time check where the token might still expire by the time it is used.
reportContent(String roomId, String eventId, {String? reason, int? score}) Future<void>
Reports an event as inappropriate to the server, which may then notify the appropriate people. The caller must be joined to the room to report it.
requestOpenIdToken(String userId, Map<String, Object?> body) Future<OpenIdCredentials>
Gets an OpenID token object that the requester may supply to another service to verify their identity in Matrix. The generated token is only valid for exchanging for user information from the federation API for OpenID.
requestTokenTo3PIDEmail(String clientSecret, String email, int sendAttempt, {String? nextLink, String? idAccessToken, String? idServer}) Future<RequestTokenResponse>
The homeserver must check that the given email address is not already associated with an account on this homeserver. This API should be used to request validation tokens when adding an email address to an account. This API's parameters and response are identical to that of the /register/email/requestToken endpoint. The homeserver should validate the email itself, either by sending a validation email itself or by using a service it has control over.
requestTokenTo3PIDMSISDN(String clientSecret, String country, String phoneNumber, int sendAttempt, {String? nextLink, String? idAccessToken, String? idServer}) Future<RequestTokenResponse>
The homeserver must check that the given phone number is not already associated with an account on this homeserver. This API should be used to request validation tokens when adding a phone number to an account. This API's parameters and response are identical to that of the /register/msisdn/requestToken endpoint. The homeserver should validate the phone number itself, either by sending a validation message itself or by using a service it has control over.
requestTokenToRegisterEmail(String clientSecret, String email, int sendAttempt, {String? nextLink, String? idAccessToken, String? idServer}) Future<RequestTokenResponse>
The homeserver must check that the given email address is not already associated with an account on this homeserver. The homeserver should validate the email itself, either by sending a validation email itself or by using a service it has control over.
requestTokenToRegisterMSISDN(String clientSecret, String country, String phoneNumber, int sendAttempt, {String? nextLink, String? idAccessToken, String? idServer}) Future<RequestTokenResponse>
The homeserver must check that the given phone number is not already associated with an account on this homeserver. The homeserver should validate the phone number itself, either by sending a validation message itself or by using a service it has control over.
requestTokenToResetPasswordEmail(String clientSecret, String email, int sendAttempt, {String? nextLink, String? idAccessToken, String? idServer}) Future<RequestTokenResponse>
The homeserver must check that the given email address is associated with an account on this homeserver. This API should be used to request validation tokens when authenticating for the /account/password endpoint.
requestTokenToResetPasswordMSISDN(String clientSecret, String country, String phoneNumber, int sendAttempt, {String? nextLink, String? idAccessToken, String? idServer}) Future<RequestTokenResponse>
The homeserver must check that the given phone number is associated with an account on this homeserver. This API should be used to request validation tokens when authenticating for the /account/password endpoint.
Performs a full text search across different categories.
searchUserDirectory(String searchTerm, {int? limit}) Future<SearchUserDirectoryResponse>
Performs a search for users. The homeserver may determine which subset of users are searched, however the homeserver MUST at a minimum consider the users the requesting user shares a room with and those who reside in public rooms (known to the homeserver). The search MUST consider local users to the homeserver, and SHOULD query remote users as part of the search.
sendMessage(String roomId, String eventType, String txnId, Map<String, Object?> body) Future<String>
This endpoint is used to send a message event to a room. Message events allow access to historical events and pagination, making them suited for "once-off" activity in a room.
sendToDevice(String eventType, String txnId, Map<String, Map<String, Map<String, Object?>>> messages) Future<void>
This endpoint is used to send send-to-device events to a set of client devices.
setAccountData(String userId, String type, Map<String, Object?> body) Future<void>
Set some account data for the client. This config is only visible to the user that set the account data. The config will be available to clients through the top-level account_data field in the homeserver response to /sync.
setAccountDataPerRoom(String userId, String roomId, String type, Map<String, Object?> body) Future<void>
Set some account data for the client on a given room. This config is only visible to the user that set the account data. The config will be delivered to clients in the per-room entries via /sync.
setAvatarUrl(String userId, Uri? avatarUrl) Future<void>
This API sets the given user's avatar URL. You must have permission to set this user's avatar URL, e.g. you need to have their access_token.
setDisplayName(String userId, String? displayname) Future<void>
This API sets the given user's display name. You must have permission to set this user's display name, e.g. you need to have their access_token.
setPresence(String userId, PresenceType presence, {String? statusMsg}) Future<void>
This API sets the given user's presence state. When setting the status, the activity time is updated to reflect that activity; the client does not need to specify the last_active_ago field. You cannot set the presence state of another user.
setPushRule(PushRuleKind kind, String ruleId, List<Object?> actions, {String? before, String? after, List<PushCondition>? conditions, String? pattern}) Future<void>
This endpoint allows the creation and modification of user defined push rules.
setPushRuleActions(PushRuleKind kind, String ruleId, List<Object?> actions) Future<void>
This endpoint allows clients to change the actions of a push rule. This can be used to change the actions of builtin rules.
setPushRuleEnabled(PushRuleKind kind, String ruleId, bool enabled) Future<void>
This endpoint allows clients to enable or disable the specified push rule.
setReadMarker(String roomId, {String? mFullyRead, String? mRead, String? mReadPrivate}) Future<void>
Sets the position of the read marker for a given room, and optionally the read receipt's location.
setRoomAlias(String roomAlias, String roomId) Future<void>
roomAlias The room alias to set. Its format is defined in the appendices.
setRoomStateWithKey(String roomId, String eventType, String stateKey, Map<String, Object?> body) Future<String>
State events can be sent using this endpoint. These events will be overwritten if <room id>, <event type> and <state key> all match.
setRoomTag(String userId, String roomId, String tag, Tag body) Future<void>
Add a tag to the room.
setRoomVisibilityOnDirectory(String roomId, {Visibility? visibility}) Future<void>
Sets the visibility of a given room in the server's public room directory.
setTyping(String userId, String roomId, bool typing, {int? timeout}) Future<void>
This tells the server that the user is typing for the next N milliseconds where N is the value specified in the timeout key. Alternatively, if typing is false, it tells the server that the user has stopped typing.
sync({String? filter, String? since, bool? fullState, PresenceType? setPresence, int? timeout}) Future<SyncUpdate>
Synchronise the client's state with the latest state on the server. Clients use this API when they first log in to get an initial snapshot of the state on the server, and then continue to call this API to get incremental deltas to the state, and to receive new messages.
toString() String
A string representation of this object.
inherited
unban(String roomId, String userId, {String? reason}) Future<void>
Unban a user from the room. This allows them to be invited to the room, and join if they would otherwise be allowed to join according to its join rules.
unbind3pidFromAccount(String address, ThirdPartyIdentifierMedium medium, {String? idServer}) Future<IdServerUnbindResult>
Removes a user's third-party identifier from the provided identity server without removing it from the homeserver.
unexpectedResponse(BaseResponse response, Uint8List body) → Never
updateAppserviceRoomDirectoryVisibility(String networkId, String roomId, Visibility visibility) Future<Map<String, Object?>>
Updates the visibility of a given room on the application service's room directory.
updateDevice(String deviceId, {String? displayName}) Future<void>
Updates the metadata on the given device.
upgradeRoom(String roomId, String newVersion) Future<String>
Upgrades the given room to a particular room version.
uploadContent(Uint8List body, {String? filename, String? contentType}) Future<Uri>
filename The name of the file being uploaded
uploadContentToMXC(String serverName, String mediaId, Uint8List body, {String? filename, String? contentType}) Future<Map<String, Object?>>
This endpoint permits uploading content to an mxc:// URI that was created earlier via POST /_matrix/media/v1/create.
uploadCrossSigningKeys({AuthenticationData? auth, MatrixCrossSigningKey? masterKey, MatrixCrossSigningKey? selfSigningKey, MatrixCrossSigningKey? userSigningKey}) Future<void>
Publishes cross-signing keys for the user.
uploadCrossSigningSignatures(Map<String, Map<String, Map<String, Object?>>> body) Future<Map<String, Map<String, Map<String, Object?>>>?>
Publishes cross-signing signatures for the user.
uploadKeys({MatrixDeviceKeys? deviceKeys, Map<String, Object?>? fallbackKeys, Map<String, Object?>? oneTimeKeys}) Future<Map<String, int>>
Publishes end-to-end encryption keys for the device.

Operators

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