Comments(评论管理)

GET /api/Comments/{postid}

  • 描述: 获取指定帖子的评论。

  • 参数:

    • postid (string, required): 帖子ID

  • 响应: 200 OK

请求示例

//api/Comments/:postid

示例代码

const myHeaders = new Headers();
myHeaders.append("Authorization", "<API Key>");

const requestOptions = {
  method: "GET",
  headers: myHeaders,
  redirect: "follow"
};

fetch("//api/Comments/:postid", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

返回示例


POST /api/Comments/Create

  • 描述: 发表评论。

  • 请求体:

    • application/json: CommentPostRequest 对象

    • text/json: CommentPostRequest 对象

    • application/*+json: CommentPostRequest 对象

  • 响应: 200 OK

请求示例

示例代码

返回示例


GET /api/Comments/Delete

  • 描述: 删除评论。

  • 参数:

    • commentId (string, required): 评论ID

  • 响应: 200 OK

请求示例

示例代码

返回示例


GET /api/Comments/Like

  • 描述: 点赞评论。

  • 参数:

    • commentId (string, required): 评论ID

  • 响应: 200 OK

请求示例

示例代码

返回示例


GET /api/Comments/UnLike

  • 描述: 取消点赞评论。

  • 参数:

    • commentId (string, required): 评论ID

  • 响应: 200 OK

请求示例

示例代码

返回示例

Last updated