API संदर्भ

Notes

डिवाइस पर स्थानीय रूप से संग्रहीत Markdown नोट्स। टैगिंग, ट्रैश/रिस्टोर और निर्यात का समर्थन करता है।

प्रकार परिभाषाएँ

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
}

ऑपरेशन

query

notes

नोट्स खोजें (शीर्षक + सामग्री)। सभी गैर-ट्रैश नोट्स सूचीबद्ध करने के लिए query खाली छोड़ें।

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

किसी query से मेल खाने वाले नोट्स की गणना करें।

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

note

ID द्वारा एकल नोट फेच करें।

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

saveNote

नोट बनाएँ या अपडेट करें। बनाने के लिए खाली id पास करें; अपडेट के लिए मौजूदा id पास करें।

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

किसी query से मेल खाने वाले नोट्स को ट्रैश में ले जाएँ।

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

restoreNotes

किसी query से मेल खाने वाले ट्रैश किए गए नोट्स को रिस्टोर करें।

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

deleteNotes

किसी query से मेल खाने वाले ट्रैश किए गए नोट्स को स्थायी रूप से हटाएँ। केवल पहले से ट्रैश किए गए नोट्स पर काम करता है।

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

exportNotes

किसी query से मेल खाने वाले नोट्स (टैग सहित) को backup/transfer के लिए JSON स्ट्रिंग के रूप में क्रमबद्ध करें।

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