Module graia.application.entities

Expand source code
from enum import Enum
from pydantic import BaseModel


class UploadMethods(Enum):
    """用于向 `uploadImage` 或 `uploadVoice` 方法描述图片的上传类型"""

    Friend = "friend"
    Group = "group"
    Temp = "temp"


class MiraiConfig(BaseModel):
    """`/config` 接口的序列化实体类"""

    cacheSize: int
    enableWebsocket: bool

Classes

class MiraiConfig (**data: Any)

/config 接口的序列化实体类

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Expand source code
class MiraiConfig(BaseModel):
    """`/config` 接口的序列化实体类"""

    cacheSize: int
    enableWebsocket: bool

Ancestors

  • pydantic.main.BaseModel
  • pydantic.utils.Representation

Class variables

var cacheSize : int
var enableWebsocket : bool
class UploadMethods (value, names=None, *, module=None, qualname=None, type=None, start=1)

用于向 uploadImageuploadVoice 方法描述图片的上传类型

Expand source code
class UploadMethods(Enum):
    """用于向 `uploadImage` 或 `uploadVoice` 方法描述图片的上传类型"""

    Friend = "friend"
    Group = "group"
    Temp = "temp"

Ancestors

  • enum.Enum

Class variables

var Friend
var Group
var Temp