/api/inbox
getShorthand
- 🛠 获取收集箱速记内容
/api/inbox/getShorthand
请求
ts
/**
* Get the content of a shorthand
*/
export interface IPayload {
/**
* shorthand id
*/
readonly id: string;
}
json5
/**
* schemas/kernel/api/inbox/getShorthand/payload.schema.json5
* 获得一则收集箱的速记内容
* REF: https://github.com/siyuan-note/siyuan/blob/v2.11.1/kernel/api/index.go#L51-L68
* @pathname: /api/inbox/getShorthand
* @version: 2.11.1
*/
{
$schema: 'https://json-schema.org/draft/2020-12/schema',
$id: 'https://github.com/siyuan-community/siyuan-sdk/raw/main/schemas/kernel/api/inbox/getShorthand/payload.schema.json5',
$comment: 'v2.11.1',
$ref: '#/$defs/root',
$defs: {
root: {
title: 'payload body',
description: 'Get the content of a shorthand',
type: 'object',
additionalProperties: false,
required: [
'id',
],
properties: {
id: {
// 速记 ID
type: 'string',
description: 'shorthand id',
pattern: '^\\d{13}$',
examples: [
'167325294279',
],
},
},
},
},
}
json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/siyuan-community/siyuan-sdk/raw/main/schemas/kernel/api/inbox/getShorthand/payload.schema.json",
"$comment": "v2.11.1",
"$ref": "#/$defs/root",
"$defs": {
"root": {
"title": "payload body",
"description": "Get the content of a shorthand",
"type": "object",
"additionalProperties": false,
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "shorthand id",
"pattern": "^\\d{13}$",
"examples": [
"167325294279"
]
}
}
}
}
}
响应
ts
/**
* Get the content of a shorthand
*/
export interface IResponse {
/**
* status code
*/
readonly code: number;
readonly data: IData;
/**
* status message
*/
readonly msg: string;
}
/**
* Response information
*/
export interface IData {
/**
* Human-friendly creation time
*/
readonly hCreated: string;
/**
* shorthand object ID
*/
readonly oId: string;
/**
* shorthand article content (HTML)
*/
readonly shorthandContent: string;
/**
* shorthand article description
*/
readonly shorthandDesc: string;
/**
* shorthand source type
*/
readonly shorthandFrom: number;
/**
* shorthand article content (Markdown)
*/
readonly shorthandMd: string;
/**
* shorthand article title
*/
readonly shorthandTitle: string;
/**
* shorthand original URL address
*/
readonly shorthandURL: string;
}
json5
/**
* schemas/kernel/api/inbox/getShorthand/response.schema.json5
* 获得一则收集箱的速记内容
* REF: https://github.com/siyuan-note/siyuan/blob/v2.11.1/kernel/api/index.go#L51-L68
* @pathname: /api/inbox/getShorthand
* @version: 2.11.1
*/
{
$schema: 'https://json-schema.org/draft/2020-12/schema',
$id: 'https://github.com/siyuan-community/siyuan-sdk/raw/main/schemas/kernel/api/inbox/getShorthand/response.schema.json5',
$comment: 'v2.11.1',
$ref: '#/$defs/root',
$defs: {
root: {
title: 'response body',
description: 'Get the content of a shorthand',
type: 'object',
additionalProperties: false,
required: [
'code',
'msg',
'data',
],
properties: {
code: {
type: 'integer',
description: 'status code',
},
msg: {
type: 'string',
description: 'status message',
},
data: {
$ref: '#/$defs/data',
},
},
},
data: {
title: 'IData',
description: 'Response information',
type: 'object',
additionalProperties: false,
required: [
'oId',
'hCreated',
'shorthandURL',
'shorthandFrom',
'shorthandTitle',
'shorthandDesc',
'shorthandMd',
'shorthandContent',
],
properties: {
oId: {
// 速记对象标识
type: 'string',
description: 'shorthand object ID',
pattern: '^\\d{13}$',
examples: [
'167325294279',
],
},
hCreated: {
// 人类友好的创建时间
type: 'string',
description: 'Human-friendly creation time',
pattern: '^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}$',
examples: [
'2023-01-09 16:29',
],
},
shorthandURL: {
// 速记原文 URL 地址
type: 'string',
description: 'shorthand original URL address',
format: 'uri',
},
shorthandFrom: {
// 速记来源类型
type: 'integer',
description: 'shorthand source type',
},
shorthandTitle: {
// 速记文章标题
type: 'string',
description: 'shorthand article title',
},
shorthandDesc: {
// 速记文章概述
type: 'string',
description: 'shorthand article description',
},
shorthandMd: {
// 速记文章内容 (Markdown)
type: 'string',
description: 'shorthand article content (Markdown)',
},
shorthandContent: {
// 速记文章内容 (HTML)
type: 'string',
description: 'shorthand article content (HTML)',
},
},
},
},
}
json
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/siyuan-community/siyuan-sdk/raw/main/schemas/kernel/api/inbox/getShorthand/response.schema.json",
"$comment": "v2.11.1",
"$ref": "#/$defs/root",
"$defs": {
"root": {
"title": "response body",
"description": "Get the content of a shorthand",
"type": "object",
"additionalProperties": false,
"required": [
"code",
"msg",
"data"
],
"properties": {
"code": {
"type": "integer",
"description": "status code"
},
"msg": {
"type": "string",
"description": "status message"
},
"data": {
"$ref": "#/$defs/data"
}
}
},
"data": {
"title": "IData",
"description": "Response information",
"type": "object",
"additionalProperties": false,
"required": [
"oId",
"hCreated",
"shorthandURL",
"shorthandFrom",
"shorthandTitle",
"shorthandDesc",
"shorthandMd",
"shorthandContent"
],
"properties": {
"oId": {
"type": "string",
"description": "shorthand object ID",
"pattern": "^\\d{13}$",
"examples": [
"167325294279"
]
},
"hCreated": {
"type": "string",
"description": "Human-friendly creation time",
"pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}$",
"examples": [
"2023-01-09 16:29"
]
},
"shorthandURL": {
"type": "string",
"description": "shorthand original URL address",
"format": "uri"
},
"shorthandFrom": {
"type": "integer",
"description": "shorthand source type"
},
"shorthandTitle": {
"type": "string",
"description": "shorthand article title"
},
"shorthandDesc": {
"type": "string",
"description": "shorthand article description"
},
"shorthandMd": {
"type": "string",
"description": "shorthand article content (Markdown)"
},
"shorthandContent": {
"type": "string",
"description": "shorthand article content (HTML)"
}
}
}
}
}