Referência da API

Notas

Notas em Markdown armazenadas localmente no dispositivo. Suporta tags, lixeira/restauração e exportação.

Definições de 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
}

Operações

query

notes

Pesquise notas (título + conteúdo). Deixe a consulta vazia para listar todas as notas não descartadas.

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

Conte notas correspondentes a uma consulta.

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

note

Obtenha uma única nota por ID.

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

saveNote

Crie ou atualize uma nota. Passe um id vazio para criar; passe um id existente para atualizar.

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

Mova para a lixeira as notas correspondentes a uma consulta.

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

restoreNotes

Restaure notas na lixeira correspondentes a uma consulta.

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

deleteNotes

Exclua permanentemente as notas na lixeira correspondentes a uma consulta. Opera apenas sobre notas já descartadas.

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

exportNotes

Serialize notas correspondentes a uma consulta (incluindo tags) como uma string JSON para backup/transferência.

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