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

## albumVideoFileList

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

### Description

Retrieve Time Album video file list

### Parameters

`Params`

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `params` | `IAlbumVideoFileListReq` | Yes | - | Request body |

### Referenced Types

##### `interface` IAlbumVideoFileListReq

| Property | Type | Description |
| --- | --- | --- |
| `stockId` | `number` | Inventory ID |
| `gid` | `string` | Home ID |
| `timeAlbumId` | `number` | Album ID |
| `beginTime` | `number` | Query start time (optional) |
| `endTime` | `number` | Query end time (optional) |
| `pageNum` | `number` | Page number (optional) |
| `pageSize` | `number` | Page size (optional) |
| `queryIdFlag` | `boolean` | Query ID flag, default false; when true, the result set returns IDs only |

##### `interface` IAlbumVideoFileList

| Property | Type | Description |
| --- | --- | --- |
| `id` | `number` | Record primary key ID |
| `captureTime` | `number` | Snapshot time (optional) |
| `type` | `0 \| 1 \| 2` | Record type: 0 - image; 1 - video; 2 - image and video (optional) |
| `coverInfo` | `IFileUrl` | Cover resource information (optional) |
| `mediaInfo` | `IFileUrl` | Media resource information (optional) |

##### `interface` IFileUrl

| Property | Type | Description |
| --- | --- | --- |
| `fileUrl` | `string` | File path |
| `fileName` | `string` | File name (custom added, not returned by the API) |


### Examples

#### Request example

```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);
```

#### Response example

```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" }
    }
  ]
}
```
