LavalinkRestClient class

Lavalink REST API client

Constructors

LavalinkRestClient({required String host, required int port, required String password, bool useSSL = false, Duration timeout = const Duration(seconds: 10)})

Properties

baseUrl String
no setter
hashCode int
The hash code for this object.
no setterinherited
host String
final
password String
final
port int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout Duration
final
useSSL bool
final

Methods

decodeTrack(String encoded) Future<Track>
Decode a single track
decodeTracks(List<String> encoded) Future<List<Track>>
Decode multiple tracks
deleteSession(String sessionId) Future<void>
Delete/destroy a session
destroyPlayer(String sessionId, String guildId) Future<void>
Destroy player
dispose() → void
getInfo() Future<Info>
Get Lavalink server info
getPlayer(String sessionId, String guildId) Future<Player>
Get player information
getPlayers(String sessionId) Future<List<Player>>
Get all players for a session
getRoutePlannerStatus() Future<Map<String, dynamic>>
Get route planner status (if enabled)
getSession(String sessionId) Future<Map<String, dynamic>>
Get session information
getStats() Future<Stats>
Get Lavalink server stats
getVersion() Future<String>
Get Lavalink version
healthCheck() Future<bool>
Health check endpoint
loadTracks(String identifier) Future<LoadResult>
Load tracks by identifier
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unmarkAllFailedAddresses() Future<void>
Unmark all failed addresses in route planner
unmarkFailedAddress(String address) Future<void>
Unmark a failed address in route planner
updatePlayer(String sessionId, String guildId, PlayerUpdate update, {bool noReplace = false}) Future<Player>
Update player state
updateSession(String sessionId, {bool? resuming, int? timeout}) Future<void>
Update session

Operators

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