Riferimento API
Documenti
Sfoglia i file documento (PDF, Office, testo, ecc.) indicizzati dall'Android MediaStore.
Definizioni di tipo
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
}Operazioni
query
docs
Cerca documenti. Lascia la query vuota per elencarli tutti.
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
Conta i documenti corrispondenti a una query.
bash
query GetDocCount($query: String!) {
docCount(query: $query)
}query
docExtGroups
Elenca tutte le estensioni file distinte con i relativi conteggi. Utile per costruire un'UI "filtra per tipo".
bash
query GetDocExtGroups {
docExtGroups { ext count }
}