API リファレンス
メモ
機能の対応状況は app.capabilities、認可は app.access とホストの権限で確認してください。例は合成値を使用しています。呼び出す前にパス、ID、入力、フィルターを置き換えてください。
型定義
graphql
type Mutation {
createNote(input: NoteInput!): Note!
deleteNotes(query: String!): ActionResult!
restoreNotes(query: String!): ActionResult!
saveFeedEntriesToNotes(query: String!): [ID!]!
trashNotes(query: String!): ActionResult!
updateNote(id: ID!, input: NoteInput!): Note!
}
type Query {
exportNotes(query: String!): String!
note(id: ID!): Note
noteCount(query: String!): Int!
notes(query: String!, offset: Int!, limit: Int!): [Note!]!
}
type ActionResult {
affectedCount: Int!
}
enum DataType {
DEFAULT
AUDIO
VIDEO
IMAGE
SMS
CONTACT
NOTE
FEED_ENTRY
CALL
PACKAGE
FILE
APP_FILE
DOC
}
scalar Instant
type Note {
id: ID!
title: String!
content: String!
deletedAt: Instant
createdAt: Instant!
updatedAt: Instant!
tags: [Tag!]!
}
input NoteInput {
title: String!
content: String!
}
type Tag {
id: ID!
name: String!
type: DataType!
count: Int!
}操作
mutation
createNote
指定した入力からメモを作成し、永続化します。
graphql
mutation createNote($input: NoteInput!) {
createNote(input: $input) { id title content deletedAt createdAt updatedAt }
}mutation
deleteNotes
クエリに一致するゴミ箱内のメモを完全に削除します。すでにゴミ箱にあるメモのみが対象です。
graphql
mutation deleteNotes($query: String!) {
deleteNotes(query: $query) { affectedCount }
}mutation
restoreNotes
クエリに一致するゴミ箱内のメモを復元します。
graphql
mutation restoreNotes($query: String!) {
restoreNotes(query: $query) { affectedCount }
}mutation
saveFeedEntriesToNotes
一致するフィード記事をメモとして保存し、作成したメモ ID を返します。
graphql
mutation saveFeedEntriesToNotes($query: String!) {
saveFeedEntriesToNotes(query: $query)
}mutation
trashNotes
クエリに一致するメモをゴミ箱に移動します。
graphql
mutation trashNotes($query: String!) {
trashNotes(query: $query) { affectedCount }
}mutation
updateNote
指定した入力から保存済みメモを更新します。
graphql
mutation updateNote($id: ID!, $input: NoteInput!) {
updateNote(id: $id, input: $input) { id title content deletedAt createdAt updatedAt }
}query
exportNotes
バックアップや転送用に、クエリに一致するメモをタグも含めて JSON 文字列にシリアライズします。
graphql
query exportNotes($query: String!) {
exportNotes(query: $query)
}query
note
ID を指定してメモを 1 件取得します。
graphql
query note($id: ID!) {
note(id: $id) { id title content deletedAt createdAt updatedAt }
}query
noteCount
クエリに一致するメモ数を数えます。
graphql
query noteCount($query: String!) {
noteCount(query: $query)
}query
notes
メモのタイトルと内容を検索します。ゴミ箱にないすべてのメモを表示するには query を空にします。
graphql
query notes($query: String!, $offset: Int!, $limit: Int!) {
notes(query: $query, offset: $offset, limit: $limit) { id title content deletedAt createdAt updatedAt }
}