- Add QzonePublishResponse interface and parsing logic for publish API responses - Add buildQzonePublishBody function to construct publish request parameters - Add buildQzoneUploadImageBody function to construct image upload request parameters - Add parseQzoneUploadImageResponseText function to parse upload API responses - Add toQzoneRichval function to format image data for publish requests - Add publishQzoneMsg method to NTQQWebApi for publishing space messages with optional images - Add uploadImageToQzone method to NTQQWebApi for uploading images to QQ space - Add getQzoneAuth private method to retrieve authentication tokens (skey, pskey, g_tk) - Add SendQzoneMsg action handler to expose QQ space publishing via OneBot API - Add comprehensive unit tests for all Qzone data construction and parsing functions - Update action router to register SendQzoneMsg action - Update action examples to demonstrate Qzone publishing usage
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
export const ExtendsActionsExamples = {
|
|
OCRImage: {
|
|
payload: { image: 'image_id_123' },
|
|
response: { texts: [{ text: '识别内容', coordinates: [] }] },
|
|
},
|
|
GetAiCharacters: {
|
|
payload: { group_id: '123456' },
|
|
response: [
|
|
{
|
|
type: 'string',
|
|
characters: [
|
|
{ character_id: 'id', character_name: 'name', preview_url: 'url' },
|
|
],
|
|
},
|
|
],
|
|
},
|
|
GetClientkey: {
|
|
payload: {},
|
|
response: { clientkey: 'abcdef123456' },
|
|
},
|
|
SetQQAvatar: {
|
|
payload: { file: 'base64://...' },
|
|
response: null,
|
|
},
|
|
SetGroupKickMembers: {
|
|
payload: { group_id: '123456', user_id: ['123456789'], reject_add_request: false },
|
|
response: null,
|
|
},
|
|
TranslateEnWordToZn: {
|
|
payload: { words: ['hello'] },
|
|
response: { words: ['你好'] },
|
|
},
|
|
GetRkey: {
|
|
payload: {},
|
|
response: { rkey: '...' },
|
|
},
|
|
SetLongNick: {
|
|
payload: { longNick: '个性签名' },
|
|
response: null,
|
|
},
|
|
SetSpecialTitle: {
|
|
payload: { group_id: '123456', user_id: '123456789', special_title: '头衔' },
|
|
response: null,
|
|
},
|
|
SendQzoneMsg: {
|
|
payload: { content: '今天天气不错', images: [], ugc_right: 1, target_uins: [] },
|
|
response: { tid: '1234567890abcdef1234567890' },
|
|
},
|
|
};
|