API 文档模板

备注

  1. 请按照下面的模板编写你的 API 文档;

  2. 严格使用 reStructuredText 语法;

  3. 严格按照模板的各类标签编写。

  4. 当你完成后,删除所有说明(类似本条)以及任何额外的头部信息。

支持以下产品:

xxx 单位

xxx 单位

以下是主机端 Speaker 的详细支持:

控制器

Atomic Echo Base

Atom Echo

Atom Lite

  • ✅:支持。

  • ⭕:可选,它与主机的某些内部资源冲突。

UiFlow2 应用示例

备注

准备一个或多个示例,充分演示 API 的功能。完成后请删除描述中的此部分。

UiFlow2 应用示例 1

MicroPython 应用示例

UiFlow2 应用示例 1

API参考

Function

func1(arg1: int, arg2: int) int

请提供需要翻译的 PO 条目中 “Function 1” 对应的 msgid 原文(最好连同该条目的上下文,如模块/类名、前后段落或完整条目)。目前只有 “Function 1, please write a detailed description of the function.” 这句话,无法确定要描述的是哪个具体函数,也无法按 UIFlow2 / MicroPython 文档风格产出准确的 msgstr

参数:
  • arg1 (int) – 参数 1。

  • arg2 (int) – 参数 2。

返回:

返回值。

返回类型:

int

UiFlow2 代码块:

MicroPython 代码块:

pass # Please put the MicroPython code of the function, and delete this line when you are done

Class1

class Class1(arg1: int)

构造函数。

参数:

arg1 (int) – 参数 1。

method1(arg1: int, arg2: int) int

方法 1:请编写该方法的详细说明。

参数:
  • arg1 (int) – 参数 1。

  • arg2 (int) – 参数 2。

返回:

返回值。

返回类型:

int

UiFlow2 代码块:

MicroPython 代码块:

pass # Please put the MicroPython code of the function, and delete this line when you are done.
property property1: int

属性 1:请编写该属性的详细描述。

UiFlow2 代码块:

MicroPython 代码块:

pass # Please put the MicroPython code of the function, and delete this line when you are done.
static staticmethod1(arg1: int, arg2: int) int

静态方法 1:请编写该静态方法的详细描述。

参数:
  • arg1 (int) – 参数 1。

  • arg2 (int) – 参数 2。

返回:

返回值。

返回类型:

int

UiFlow2 代码块:

MicroPython 代码块:

pass # Please put the MicroPython code of the function, and delete this line when you are done.
classmethod classmethod1(arg1: int, arg2: int) int

请提供需要翻译的 PO 条目(至少包含该方法对应的 msgid 原文;最好连同前后文、方法名/签名、参数说明一起贴出)。目前只有 “Class method 1” 这一句,无法确定具体类方法内容与术语,无法按 UIFlow2 / MicroPython 文档规范写出准确的中文详细描述。

参数:
  • arg1 (int) – 参数 1。

  • arg2 (int) – 参数 2。

返回:

返回值。

返回类型:

int

UiFlow2 代码块:

MicroPython 代码块:

pass # Please put the MicroPython code of the function, and delete this line when you are done.
b: int

属性 b:请编写该属性的详细描述。

UiFlow2 代码块:

MicroPython 代码块:

pass # Please put the MicroPython code of the function, and delete this line when you are done.
CONSTANT1: int

常量 1:用于表示一个固定不变的取值(数值为 1),通常用于在程序中表达明确的逻辑含义或作为配置/标志位使用。常量采用全大写命名,以便与普通变量区分并强调其只读语义。在运行过程中,该常量的值不应被修改;将 1 抽象为具名常量可以提升代码可读性与可维护性,避免在多处直接使用“魔法数字”导致含义不清或后期修改困难。

UiFlow2 代码块:

MicroPython 代码块:

pass # Please put the MicroPython code of the function, and delete this line when you are done.

Class2

class Class2

构造函数。