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)
}