API Types#
When it comes to working with low level API, dealing with raw JSON payloads and handling API payloads manually can be an overwhelming task.
To ease you in this case, Library provides easy to use type defintions for Revolt API that only allow you to properly typehint your application but also get cutting edge autocompletion in your code editor.
Enumerations#
This section documents various enumerations from the Revolt API. All these are type aliases of
typing.Literal
.
- luster.types.EventTypeSend#
The types of websocket events that are sent by the client.
- luster.types.EventTypeRecv#
The types of websocket events that are received by the client.
- luster.types.EventType#
The types of websocket events. This is equivalent to
typing.Union
ofEventTypeSend
andEventTypeRecv
.
- luster.types.ErrorId#
The error labels often sent in
ErrorEvent
websocket event.
- luster.types.WebsocketVersion#
The versions for Revolt websocket protocol.
- luster.types.WebsocketFormat#
The formats used for packets transport in Revolt websocket protocol.
API Models#
This section documents type definitions for various API models. All these type definitions
are subclasses of typing.TypedDict
.
NodeInfo#
- class luster.types.NodeInfo#
Represents the Revolt node info often returned by
fetch_api_info()
route.- features: luster.types.node_info.NodeInfoFeatures#
The features enabled on this Revolt node.
NodeInfoFeatures#
- class luster.types.NodeInfoFeatures#
Represents the features of a Revold node retrieved from
NodeInfo
- autumn: luster.types.node_info.NodeInfoAutumnFeature#
The file server configuration.
- captcha: luster.types.node_info.NodeInfoCaptchaFeature#
The human captcha (hCaptcha) configuration.
- january: luster.types.node_info.NodeInfoJanuaryFeature#
The proxy service configuration.
- voso: luster.types.node_info.NodeInfoVosoFeature#
The voice server configuration.
NodeInfoCaptchaFeature#
NodeInfoAutumnFeature#
NodeInfoJanuaryFeature#
NodeInfoVosoFeature#
HTTP Routes#
This section documents type definitions for various HTTP routes. All these type definitions
are subclasses of typing.TypedDict
.
QueryNodeResponse#
Websocket Events#
This section documents type definitions for various websocket events. All these type definitions
are subclasses of typing.TypedDict
.