Expression API

class mini.apis.api_expression.RobotExpressionType(value)[source]

Bases: enum.Enum

Robot expression type

INNER (built-in): Unmodifiable emoticon files built into the robot

INNER = 0
class mini.apis.api_expression.PlayExpression(is_serial: bool = True, express_name: Optional[str] = None)[source]

Bases: mini.apis.base_api.BaseApi

Play built-in emoji api

Let the robot eyes show an expression

Parameters
  • is_serial (bool) – Whether to wait for a reply, the default is True

  • express_name (str) – emoticon name, cannot be empty or None

#PlayExpressionResponse.isSuccess: Is it successful

#PlayExpressionResponse.resultCode: Return code

async execute()[source]

Execute the play emoticon command

Returns

PlayExpressionResponse

class mini.apis.api_expression.MouthLampColor(value)[source]

Bases: enum.Enum

Mouth light color

RED: red

GREEN: Green

WHITE: white

RED = 1
GREEN = 2
WHITE = 4
class mini.apis.api_expression.MouthLampMode(value)[source]

Bases: enum.Enum

Mouth light mode

NORMAL (normal mode): constant light mode

BREATH (breathing mode): Breathing mode

NORMAL = 0
BREATH = 1
class mini.apis.api_expression.SetMouthLamp(is_serial: bool = True, mode: mini.apis.api_expression.MouthLampMode = MouthLampMode.NORMAL, color: mini.apis.api_expression.MouthLampColor = MouthLampColor.RED, duration: int = 1000, breath_duration: int = 1000)[source]

Bases: mini.apis.base_api.BaseApi

Set mouth light api

Set parameters such as the mode and color of the mouth light

When mode=NORMAL, the duration parameter works, indicating how long it will be on

When mode=BREATH, the breath_duration parameter indicates how often to breathe

After the setting takes effect, the robot will immediately return the setting result (it has nothing to do with the set duration parameter)

Parameters
  • is_serial (bool) – Whether to wait for a reply, the default is True

  • mode (MouthLampMode) – Mouth lamp mode, default NORMAL, normal (constant light) mode

  • color (MouthLampColor) – Mouth lamp color, default RED, red

  • duration (int) – duration, in milliseconds, -1 means unlimited time, when the length is set to more than 10s, the result will be returned within 10s

  • breath_duration (int) – the duration of one blink, in milliseconds

#SetMouthLampResponse.isSuccess: Is it successful

#SetMouthLampResponse.resultCode: Return code

async execute()[source]

Execute the command to set the mouth light

Returns

SetMouthLampResponse

class mini.apis.api_expression.ControlMouthLamp(is_serial: bool = True, is_open: bool = True)[source]

Bases: mini.apis.base_api.BaseApi

Control mouth light switch api

Turn on/off the mouth light

Parameters
  • is_serial (bool) – Whether to wait for a reply, the default is True

  • is_open (bool) – Whether to turn on the mouth light. Default true, turn on the mouth light

#ControlMouthResponse.isSuccess: Is it successful

#ControlMouthResponse.resultCode: Return code

async execute()[source]

Execute the command to control the mouth light

Returns

ControlMouthResponse