Référence de l'API
Vidéos
Vérifier app.capabilities pour la prise en charge des fonctionnalités et app.access ainsi que les permissions de l’hôte pour les autorisations. Les exemples utilisent des valeurs synthétiques ; remplacer les chemins, ID, entrées et filtres avant tout appel.
Définitions de types
graphql
type Query {
videoCount(query: String!): Int!
videos(query: String!, offset: Int!, limit: Int!, sortBy: VideoSortBy!): [Video!]!
}
enum DataType {
DEFAULT
AUDIO
VIDEO
IMAGE
SMS
CONTACT
NOTE
FEED_ENTRY
CALL
PACKAGE
FILE
APP_FILE
DOC
}
scalar Instant
scalar Long
interface MediaItem {
id: ID!
title: String!
path: String!
size: Long!
bucketId: ID!
createdAt: Instant!
updatedAt: Instant!
}
type Tag {
id: ID!
name: String!
type: DataType!
count: Int!
}
type Video implements MediaItem {
width: Int!
height: Int!
rotation: Int!
id: ID!
title: String!
path: String!
durationMs: Long!
size: Long!
bucketId: ID!
createdAt: Instant!
updatedAt: Instant!
takenAt: Instant
isFavorite: Boolean!
tags: [Tag!]!
}
enum VideoSortBy {
UPDATED_AT_ASC
UPDATED_AT_DESC
SIZE_ASC
SIZE_DESC
NAME_ASC
NAME_DESC
TAKEN_AT_DESC
}Opérations
query
videoCount
Compter les fichiers vidéo correspondant à une requête.
graphql
query videoCount($query: String!) {
videoCount(query: $query)
}query
videos
Rechercher des fichiers vidéo. Laisser query vide pour tous les lister.
graphql
query videos($query: String!, $offset: Int!, $limit: Int!, $sortBy: VideoSortBy!) {
videos(query: $query, offset: $offset, limit: $limit, sortBy: $sortBy) { width height rotation id title path durationMs size }
}