Tham chiếu API

Videos

Duyệt các tệp video được lưu trữ trên thiết bị.

Định nghĩa kiểu

bash
type Video {
  id: ID!
  title: String!
  path: String!
  duration: Int!       # milliseconds
  size: Int!           # bytes
  bucketId: String!
  createdAt: String!
  updatedAt: String!
  takenAt: String      # capture time (nullable)
  tags: [Tag!]!
}

Thao tác

query

videos

Tìm kiếm tệp video. Để query trống để liệt kê tất cả.

bash
query GetVideos($offset: Int!, $limit: Int!, $query: String!, $sortBy: FileSortBy!) {
  videos(offset: $offset, limit: $limit, query: $query, sortBy: $sortBy) {
    id title path duration size bucketId createdAt updatedAt takenAt
    tags { id name }
  }
}
query

videoCount

Đếm tệp video khớp với một query.

bash
query GetVideoCount($query: String!) {
  videoCount(query: $query)
}