MetricsConnection class
Constructors
-
MetricsConnection({String restEndpoint = defaultRestEndpoint, String socketEndpoint = defaultSocketEndpoint, bool shouldEnableWebSocket = defaultShouldEnableWebSocket, Duration socketTimeout = defaultSocketTimeout, int concurrentRequestLimit = defaultConcurrentRequestLimit, int requestRetryLimit = defaultRequestRetryLimit, bool shouldEnableErrorLogging = false, int? socketRetryTimeout})
-
Creates a new instance of MetricsConnection.
Methods
-
action({required String path, required String action, required String method, Map<String, dynamic> queryParameters = const {}, Map<String, dynamic> socketParameters = const {}, Map<String, dynamic>? bodyParameters})
→ Future<ResponseMessage>
-
This method makes a request to a desired route.
-
close()
→ void
-
Closes the websocket and rest connections.
-
dispose()
→ Future<void>
-
Closes and disposes everything within the connection class.
-
initializeAuthenticatedSession({required String token})
→ Future<void>
-
Creates an authenticated session. This method must be called before
making any requests to authenticated routes.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
open()
→ void
-
Opens the websocket and REST connections.
-
sendChatRoomMessage({required String room, required Map<String, dynamic> params})
→ Future<ResponseMessage>
-
Send a websocket message directly to a server chatroom
-
toString()
→ String
-
A string representation of this object.
inherited