# 乐问

# 新增问题

事件类型:question/add

# 回调示例

{
    "_id": "14139e12614a9ed80e4548966d9ad015",
    "nonce": "3c540ea9-ec58-4f72-9316-aaf533cd3b35",
    "timestamp": 1632280276,
    "sign": "9c5aeebb4d512d2763e027a7cd96aa7aed74c015",
    "action": "question/add",
    "is_anonymous": 0,
    "attributes": {
      "question_id": "c014b6a01b5211ec8873fa828732a477",
      "title": "创建乐问",
      "content": "<p>创建乐问</p>",
      "created_at": "2021-09-22 11:11:16",
      "question_tags": [
        {
          "id": "b8087e34558a11e79d435254002b6735",
          "name": "标签1"
        }
      ]
    },
    "operator": "sanzhang",
    "operator_info": {
      "name": "张三"
    }
  }

# 编辑问题

事件类型:question/edit

# 回调示例

{
    "_id": "8937eaa9614a9fc90cf2a84e40245e92",
    "nonce": "eb68b128-d1b8-47df-9eda-1a22858cea37",
    "timestamp": 1632280518,
    "sign": "5c4f99833bf77c4f6bf8febc2a0df8bd9556ec73",
    "action": "question/edit",
    "is_anonymous": 0,
    "attributes": {
      "question_id": "c014b6a01b5211ec8873fa828732a477",
      "title": "编辑乐问",
      "content": "<p>编辑乐问</p>",
      "question_tags": [
        {
          "id": "a12c923261b711e99d575254009b5a66",
          "name": "标签2"
        },
        {
          "id": "b8087e34558a11e79d435254002b6735",
          "name": "标签1"
        }
      ]
    },
    "operator": "sanzhang",
    "operator_info": {
      "name": "张三"
    }
  }

# 删除问题

事件类型:question/delete

# 回调示例

{
    "_id": "cd045e75614aa0e40ff956bc3beeecf7",
    "nonce": "d7dfa28c-754d-4f4e-a91f-3f8db89a298d",
    "timestamp": 1632280801,
    "sign": "4c8a0d71d1dc4dbc27db55b3a3daeded10bd2241",
    "action": "question/delete",
    "is_anonymous": 0,
    "attributes": {
      "question_id": "c014b6a01b5211ec8873fa828732a477",
      "question_tags": [
        {
          "id": "a12c923261b711e99d575254009b5a66",
          "name": "标签2"
        },
        {
          "id": "b8087e34558a11e79d435254002b6735",
          "name": "标签1"
        }
      ]
    },
    "operator": "sanzhang",
    "operator_info": {
      "name": "张三"
    }
  }

# 还原问题

事件类型:question/restore

# 回调示例

{
  "nonce": "6445714c-b84c-4a30-aacf-2ba4432eb6e6",
  "timestamp": 1605235815,
  "sign": "1cb4f60c4a02f74d80df228cf0b21c98aee699b4",
  "operator": "staffID",
  "operator_info":{"name":"staffID"},
  "is_anonymous": 0,
  "action": "question/restore",
  "attributes": {
    "question_id": "5513b170240011eb90a8c26a09880474",
    "title": "title",
    "content": "content",
    "tags": [
      "标签1"
    ]
  }
}

# 新增问题邀请

事件类型:question/invitation/add

# 回调示例

{
  "nonce": "a07a26f0-da62-4cb8-8d76-28b36e9b8cbf",
  "timestamp": 1605235900,
  "sign": "dc7a446610f6b87859e300e81f830592e24a39ea",
  "operator": "staffID",
  "operator_info":{"name":"staffID"},
  "action": "question/invitation/add",
  "attributes": {
    "question_id": "2585bb38d9ba11e9b2b60a58ac1303f1",
    "invitation_id": "272ccbbe255b11ebbc552e8bf4ac4f79",
    "reason": "邀请理由",
    "invitee": "48cb765ccee111e9b2705254009b5a66"
  }
}

# 推荐问题

事件类型:question/recommend

# 回调示例

{
  "nonce": "c04690a9-3d1e-4d55-9032-95fd57e63759",
  "timestamp": 1605236010,
  "sign": "888d6719836ca2293d8edeee4052ee8c9250ae86",
  "operator": "staffID",
  "operator_info":{"name":"staffID"},
  "action": "question/recommend",
  "attributes": {
    "question_id": "2585bb38d9ba11e9b2b60a58ac1303f1"
  }
}

# 取消推荐问题

事件类型:question/cancel-recommend

# 回调示例

{
  "nonce": "ef9b9f3b-9749-45b3-a57e-1c5b94b299fe",
  "timestamp": 1605235976,
  "sign": "196ed639d8d6239c51f31e8e9e30ffd70ae59892",
  "operator": "staffID",
  "operator_info":{"name":"staffID"},
  "action": "question/cancel-recommend",
  "attributes": {
    "question_id": "2585bb38d9ba11e9b2b60a58ac1303f1"
  }
}

# 新增问题关注

事件类型:question/concern/add

# 回调示例

{
  "nonce": "1d83d0db-870d-4b18-9566-f8d00c50b4c5",
  "timestamp": 1605236060,
  "sign": "640c18bb1a7ac243f403a9641383c33af507187c",
  "operator": "staffID",
  "operator_info":{"name":"staffID"},
  "action": "question/concern/add",
  "attributes": {
    "question_id": "2585bb38d9ba11e9b2b60a58ac1303f1",
    "concern_id": "853f66d0255b11eb87792e8bf4ac4f79"
  }
}

# 取消问题关注

事件类型:question/concern/delete

# 回调示例

{
  "nonce": "74ee034a-1af3-47b5-8b37-8ec9def279f9",
  "timestamp": 1605236094,
  "sign": "65255e05a9cd3344edd902e9983b5254c0ea524a",
  "operator": "staffID",
  "operator_info":{"name":"staffID"},
  "action": "question/concern/delete",
  "attributes": {
    "concern_id": "853f66d0255b11eb87792e8bf4ac4f79"
  }
}

# 新增问题回答

事件类型:question/answer/add

# 回调示例

{
  "nonce": "865b2e1f-c12c-4873-9334-c5c42243dcd8",
  "timestamp": 1605085870,
  "sign": "d5c90333b087b02183ff0a9a6cc67f7a3fbe1bb6",
  "operator": "staffID",
  "operator_info":{"name":"staffID"},
  "is_anonymous": 0,
  "action": "question/answer/add",
  "attributes": {
    "question_id": "2585bb38d9ba11e9b2b60a58ac1303f1",
    "answer_id": "d62edb8e23fd11eb80be26cfb956ad31",
    "content": "回答啦"
  }
}

# 编辑问题回答

事件类型:question/answer/edit

# 回调示例

{
  "nonce": "f9c65c52-0d4f-4a9a-8f08-b5fce97bd4fb",
  "timestamp": 1605236137,
  "sign": "f5b26bbf6d8fbf676754842847ae25f6b20c2485",
  "operator": "staffID",
  "operator_info":{"name":"staffID"},
  "is_anonymous": 0,
  "action": "question/answer/edit",
  "attributes": {
    "question_id": "2585bb38d9ba11e9b2b60a58ac1303f1",
    "answer_id": "d62edb8e23fd11eb80be26cfb956ad31",
    "content": "回答内容"
  }
}

# 删除回答

事件类型:answer/delete

# 回调示例

{
  "nonce": "3ca3f4a0-355d-47ee-a336-863202a19bb1",
  "timestamp": 1605236173,
  "sign": "4b5c16e8812dd4099135ab382a7b1257277f706f",
  "operator": "staffID",
  "operator_info":{"name":"staffID"},
  "is_anonymous": 0,
  "action": "answer/delete",
  "attributes": {
    "answer_id": "d62edb8e23fd11eb80be26cfb956ad31"
  }
}

# 置顶回答

事件类型:answer/pin

# 回调示例

{
  "nonce": "94e44bf1-0d02-4ef8-9172-e25f2f67b632",
  "timestamp": 1605236213,
  "sign": "6f97fc16ff9751692b8241ca42154fb5284e6fcd",
  "operator": "staffID",
  "operator_info":{"name":"staffID"},
  "action": "answer/pin",
  "attributes": {
    "answer_id": "ee2357b8225611ebb30fea5b8c658b76"
  }
}

# 取消置顶回答

事件类型:answer/cancel-pin

# 回调示例

{
  "nonce": "0304a7de-7a7b-4e47-8f89-accb2e4b2184",
  "timestamp": 1605236244,
  "sign": "0d92873405e5b5f18e597df9d7d25fcb3b2bc5d9",
  "operator": "staffID",
  "operator_info":{"name":"staffID"},
  "action": "answer/cancel-pin",
  "attributes": {
    "answer_id": "ee2357b8225611ebb30fea5b8c658b76"
  }
}