# QCStatus Protocol **Repository Path**: arclight-io/qcstatus-protocol ## Basic Information - **Project Name**: QCStatus Protocol - **Description**: QCStatus通讯协议文档 - **Primary Language**: Unknown - **License**: CC-BY-SA-4.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-06-21 - **Last Updated**: 2025-10-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # QCStatus Protocol v2 QC-Status Protocol是一个简单的Fediverse标准。 ## 1,数据端点 ### 1.1 用户信息API 请求 https://<域名>/api/qcstatus/user/<用户账户名>,返回以下JSON: ``` { "code": 200, "user": { "account": "<用户账户名>", "displayname": "<用户昵称>", "headerimg": { "large": "<用户头像大图URL>", "normal": "<用户头像中等图URL>", "small": "<用户头像小图URL>", "bit": "<用户头像微缩图URL>" } } } ``` ### 1.2 帖子响应格式 请求帖子类API,一律返回如下格式: ``` { "code": 200, "page": <页码>, "tiezis": [ <帖子1信息>, <帖子2信息>... ] } ``` 单个帖子信息如下:(如果不是回复,则parent项为null) ``` { "domain": "<域名>", "tid": "<帖子TID>", "sender": { "note": "<发送人账户名>", "domain": "<域名>" }, "sendtime": "<发送时间戳>", "content": { "type": "note", "cw": null, "content": <内容数组> }, "parent": { "domain":"<父帖子所在域名>", "tid":"<父帖子ID>" } } ``` 内容数组格式大致如下: ``` [ { "type": "text", "content": "<文本段1>" }, { "type": "h1", "content": "<一级标题1>" }, { "type": "h3", "content": "<三级标题1>" }, { "type": "text", "content": "<文本段2>" }, { "type": "h3", "content": "<二级标题1>" }, { "type": "img", "content": "<图片1URL>", "alt":"<图片1名称>" }, ... ] ``` ### 1.3 评论 ### 1.4 帖子API 请求 https://<域名>/api/qcstatus/user/<用户账户名>/note/\[p<页码>],返回用户发布的帖子列表;\ 请求 https://<域名>/api/qcstatus/note/user/<用户账户名>/\[p<页码>],返回用户发布的帖子列表;\ 请求 https://<域名>/api/qcstatus/note/\[p<页码>],返回本站全部帖子列表;\ 请求 https://<域名>/api/qcstatus/note/\\[p<页码>],返回帖子;\ 请求 https://<域名> ## 2,协议细节 1. 每次从其他网站请求到的数据应当缓存在数据库中(否则协议无法完整运行)。 2. 请尽量不要依赖官方程序实现的不在本文档中的API,否则会有兼容性问题。 3. 如果要实现对外提供端点,请务必完整实现,否则大概率会出问题。