Référence de l'API
Documents
Parcourez les fichiers documentaires (PDF, Office, texte, etc.) indexés par l'Android MediaStore.
Définitions de types
bash
type Doc {
id: ID!
title: String! # filename
path: String!
size: Int! # bytes
bucketId: String! # media store bucket
createdAt: String!
updatedAt: String!
tags: [Tag!]!
}
type DocExtGroup {
ext: String! # file extension without dot, e.g. "pdf"
count: Int!
}
enum FileSortBy {
SIZE_ASC SIZE_DESC
NAME_ASC NAME_DESC
DATE_ADDED_ASC DATE_ADDED_DESC
DATE_MODIFIED_ASC DATE_MODIFIED_DESC
}Opérations
query
docs
Recherche des documents. Laissez la requête vide pour tout lister.
bash
query GetDocs($offset: Int!, $limit: Int!, $query: String!, $sortBy: FileSortBy!) {
docs(offset: $offset, limit: $limit, query: $query, sortBy: $sortBy) {
id title path size bucketId createdAt updatedAt
tags { id name }
}
}query
docCount
Compte les documents correspondant à une requête.
bash
query GetDocCount($query: String!) {
docCount(query: $query)
}query
docExtGroups
Liste toutes les extensions de fichier distinctes et leurs compteurs. Utile pour construire une interface « filtrer par type ».
bash
query GetDocExtGroups {
docExtGroups { ext count }
}