Skip to content

API Handler

lsp_utils.ApiWrapperInterface

Bases: ABC

An interface for sending and receiving requests and notifications from and to the server.

An implementation of it is available through the GenericClientHandler.on_ready() override.

send_notification abstractmethod

send_notification(method: str, params: Any) -> None

Send a notification to the server.

send_request abstractmethod

send_request(method: str, params: Any, handler: Callable[[Any, bool], None]) -> None

Send a request to the server.

The handler will be called with the result received from the server and a boolean value False if request has succeeded and True if it returned an error.