---
name: "fetchPetAudios"
mode: "kit"
versionRequirements:
  - { name: "@tuya-miniapp/cloud-api", version: "1.0.5" }
---

## fetchPetAudios

> [VERSION] @tuya-miniapp/cloud-api >= 1.0.5

### 描述

获取宠物媒体文件

### 参数

`Params`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `devId` | `string` | 是 | - | 设备 id |

### 引用对象

##### `type` Audio

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `fileNo` | `string` | 云存文件 id（与上传、下载、删除等接口中的 fileNo 一致） |
| `fileName` | `string` | 展示用文件名 |
| `publicUrl` | `string` | 可公开访问的云存文件地址（若有） |


### 示例代码

#### 请求示例

```typescript
import { fetchPetAudios } from '@tuya-miniapp/cloud-api';

fetchPetAudios('vdevo167504******003')
  .then((res) => {
    console.log(res.data);
  })
  .catch();
```

#### 返回示例

```json
{
  "data": [
    {
      "fileNo": "file-no-1",
      "fileName": "bark.wav",
      "publicUrl": "https://example.com/storage/bark.wav"
    }
  ]
}
```
