API 參考

Videos

瀏覽裝置上儲存的影片檔案。

型別定義

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!]!
}

操作

query

videos

搜尋影片檔案。查詢留空可列出全部。

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

計算符合查詢的影片檔案數量。

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