get_friends_with_category

get_friends_with_category只读扩展
获取分组好友列表

通过 POST http://127.0.0.1:3000/get_friends_with_category(请求体为 JSON 参数)或 WebSocket 调用。

输入参数

该动作无需参数。

返回 (data)

好友分组数组;每组包含 categoryId、categoryName、categoryMbCount 和 buddyList。

所有响应都包裹在标准信封中:{ "status": "ok", "retcode": 0, "data": ... }。下表描述 data 字段。

data 为数组,每个元素:

字段 类型 必填 说明
categoryId integer 分组 ID
categoryName string 分组名称
categoryMbCount integer 服务端报告的分组好友数
buddyList object[] 该分组内的好友
原始 JSON Schema
{
  "type": "array",
  "description": "带分组的好友列表",
  "items": {
    "type": "object",
    "properties": {
      "categoryId": {
        "type": "integer",
        "description": "分组 ID"
      },
      "categoryName": {
        "type": "string",
        "description": "分组名称"
      },
      "categoryMbCount": {
        "type": "integer",
        "description": "服务端报告的分组好友数"
      },
      "buddyList": {
        "type": "array",
        "description": "该分组内的好友",
        "items": {
          "type": "object",
          "properties": {
            "user_id": {
              "type": "integer",
              "description": "QQ 号"
            },
            "nickname": {
              "type": "string",
              "description": "昵称"
            },
            "remark": {
              "type": "string",
              "description": "好友备注"
            }
          },
          "required": [
            "user_id",
            "nickname",
            "remark"
          ]
        }
      }
    },
    "required": [
      "categoryId",
      "categoryName",
      "categoryMbCount",
      "buddyList"
    ]
  }
}

调用示例

curl
Python
JavaScript
Go
SnowLuma SDK
curl -X POST http://127.0.0.1:3000/get_friends_with_category \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <access-token>' \
  -d '{}'
在用 AI 助手?

支持 MCP 的客户端可直接发现并调用本动作,无需手写 HTTP。见 MCP 接入