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

## albumVideoFileList

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

### 描述

时光相册录像文件列表获取

### 参数

`Params`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `params` | `IAlbumVideoFileListReq` | 是 | - | 请求体 |

### 引用对象

##### `interface` IAlbumVideoFileListReq

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `stockId` | `number` | 库存 id |
| `gid` | `string` | 家庭 id |
| `timeAlbumId` | `number` | 相册 id |
| `beginTime` | `number` | 查询开始时间（可选） |
| `endTime` | `number` | 查询结束时间（可选） |
| `pageNum` | `number` | 页码（可选） |
| `pageSize` | `number` | 每页条数（可选） |
| `queryIdFlag` | `boolean` | 查询 ID 标识，默认 false；为 true 时结果集只返回 id |

##### `interface` IAlbumVideoFileList

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `id` | `number` | 记录主键 id |
| `captureTime` | `number` | 抓图时间（可选） |
| `type` | `0 \| 1 \| 2` | 记录类型：0-图片；1-视频；2-图片和视频（可选） |
| `coverInfo` | `IFileUrl` | 封面资源信息（可选） |
| `mediaInfo` | `IFileUrl` | 媒体资源信息（可选） |

##### `interface` IFileUrl

| 属性 | 类型 | 描述 |
| --- | --- | --- |
| `fileUrl` | `string` | 文件路径 |
| `fileName` | `string` | 文件名称（自定义添加，非接口返回） |


### 示例代码

#### 请求示例

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

albumVideoFileList({
  stockId: 1,
  gid: '194137',
  timeAlbumId: 100,
  pageNum: 1,
  pageSize: 20,
})
  .then((res) => console.log(res))
  .catch(console.error);
```

#### 返回示例

```json
{
  "total": 1,
  "list": [
    {
      "id": 10001,
      "captureTime": 1700000000000,
      "type": 1,
      "coverInfo": { "fileUrl": "https://images.example.com/thumb.jpg" },
      "mediaInfo": { "fileUrl": "https://videos.example.com/clip.mp4" }
    }
  ]
}
```
