Referencia de la API

Notas

Notas en Markdown almacenadas localmente en el dispositivo. Admite etiquetado, papelera/restauración y exportación.

Definiciones de tipos

bash
type Note {
  id: ID!
  title: String!
  content: String!            # Markdown body
  createdAt: String!          # ISO 8601
  updatedAt: String!
  trashed: Boolean!           # true when in trash
  tags: [Tag!]!
}

input NoteInput {
  title: String
  content: String
}

Operaciones

query

notes

Busca notas (título + contenido). Deja la consulta vacía para listar todas las notas no enviadas a la papelera.

bash
query GetNotes($offset: Int!, $limit: Int!, $query: String!) {
  notes(offset: $offset, limit: $limit, query: $query) {
    id title content createdAt updatedAt trashed
    tags { id name }
  }
}
query

noteCount

Cuenta las notas que coinciden con una consulta.

bash
query GetNoteCount($query: String!) {
  noteCount(query: $query)
}
query

note

Obtiene una única nota por ID.

bash
query GetNote($id: ID!) {
  note(id: $id) { id title content createdAt updatedAt trashed tags { id name } }
}
mutation

saveNote

Crea o actualiza una nota. Pasa un id vacío para crear; pasa un id existente para actualizar.

bash
mutation SaveNote($id: ID!, $input: NoteInput!) {
  saveNote(id: $id, input: $input) { id title updatedAt }
}
mutation

saveFeedEntriesToNotes

Bulk-save feed entries matching a query as notes (title = feed entry title, content = "# <title>\n\n<body>"). Returns the saved feed entry IDs.

bash
mutation SaveFeedEntriesToNotes($query: String!) {
  saveFeedEntriesToNotes(query: $query)
}
mutation

trashNotes

Mueve las notas que coinciden con una consulta a la papelera.

bash
mutation TrashNotes($query: String!) {
  trashNotes(query: $query)
}
mutation

restoreNotes

Restaura las notas enviadas a la papelera que coinciden con una consulta.

bash
mutation RestoreNotes($query: String!) {
  restoreNotes(query: $query)
}
mutation

deleteNotes

Elimina definitivamente las notas en la papelera que coinciden con una consulta. Solo opera sobre notas ya en la papelera.

bash
mutation DeleteNotes($query: String!) {
  deleteNotes(query: $query)
}
mutation

exportNotes

Serializa las notas que coinciden con una consulta (incluidas las etiquetas) como una cadena JSON para copia de seguridad/transferencia.

bash
mutation ExportNotes($query: String!) {
  exportNotes(query: $query)
}