PlainApp
API குறிப்பு

பிடித்தவை

அம்ச ஆதரவிற்கு app.capabilities-ஐயும் அனுமதிக்கு app.access மற்றும் host அனுமதிகளையும் சரிபார்க்கவும். எடுத்துக்காட்டுகள் செயற்கை மதிப்புகளைப் பயன்படுத்துகின்றன; அழைப்பதற்கு முன் பாதைகள், ID-கள், உள்ளீடுகள் மற்றும் வடிப்பான்களை மாற்றவும்.

வகை வரையறைகள்

graphql
type Mutation {
  addFavoriteFolder(rootPath: String!, fullPath: String!): [FavoriteFolder!]!
  removeFavoriteFolder(fullPath: String!): [FavoriteFolder!]!
  setFavoriteFolderAlias(fullPath: String!, alias: String!): [FavoriteFolder!]!
}

type Query {
  favoriteFolders: [FavoriteFolder!]!
}

type FavoriteFolder {
	rootPath: String!
	fullPath: String!
	alias: String
}

செயல்பாடுகள்

mutation

addFavoriteFolder

விரைவாக அணுக கோப்புறையைப் புத்தகக்குறியிடவும். அனைத்து புத்தகக்குறியிட்ட கோப்புறைகளின் புதுப்பிக்கப்பட்ட பட்டியலைத் தரும்.

graphql
# Register a favorite folder and return the whole list.
mutation addFavoriteFolder($rootPath: String!, $fullPath: String!) {
  addFavoriteFolder(rootPath: $rootPath, fullPath: $fullPath) { rootPath fullPath alias }
}
mutation

removeFavoriteFolder

புத்தகக்குறியிட்ட கோப்புறையை அகற்றவும். மீதமுள்ள கோப்புறைகளின் புதுப்பிக்கப்பட்ட பட்டியலைத் தரும்.

graphql
# Remove the favorite folder identified by `fullPath` and return the
# whole list.
mutation removeFavoriteFolder($fullPath: String!) {
  removeFavoriteFolder(fullPath: $fullPath) { rootPath fullPath alias }
}
mutation

setFavoriteFolderAlias

புத்தகக்குறியிட்ட கோப்புறைக்குக் காட்டப்படும் மாற்றுப்பெயரை அமைக்கவும் அல்லது புதுப்பிக்கவும். மாற்றுப்பெயரை அழிக்க வெற்றுச் சரத்தை வழங்கவும்.

graphql
# Set the favorite folder's display alias and return the whole list; error if the favorite does not exist.
mutation setFavoriteFolderAlias($fullPath: String!, $alias: String!) {
  setFavoriteFolderAlias(fullPath: $fullPath, alias: $alias) { rootPath fullPath alias }
}
query

favoriteFolders

சேமிக்கப்பட்ட பிடித்த கோப்புறைகளையும் அவற்றின் மாற்றுப்பெயர்களையும் பட்டியலிடவும்.

graphql
# List all favorite folders.
query favoriteFolders {
  favoriteFolders { rootPath fullPath alias }
}