Riferimento API

Note

Note Markdown memorizzate localmente sul dispositivo. Supporta tag, cestino/ripristino ed esportazione.

Definizioni di tipo

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
}

Operazioni

query

notes

Cerca note (titolo + contenuto). Lascia la query vuota per elencare tutte le note non cestinate.

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

Conta le note corrispondenti a una query.

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

note

Recupera una singola nota per ID.

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

saveNote

Crea o aggiorna una nota. Passa un id vuoto per creare; passa un id esistente per aggiornare.

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

Sposta nel cestino le note corrispondenti a una query.

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

restoreNotes

Ripristina le note cestinate corrispondenti a una query.

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

deleteNotes

Elimina definitivamente le note cestinate corrispondenti a una query. Opera solo su note già cestinate.

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

exportNotes

Serializza le note corrispondenti a una query (inclusi i tag) come stringa JSON per backup/trasferimento.

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