Comment: update

Comment: update

更新评论内容。

Request

HTTP request

PATCH https://www.featapi.com/api/activity/comment/{id}/

Parameters

  • Path parameters
Parameter nameValueDescription
idstring评论id

授权

此请求需要具有以下所有范围的授权:

Scopes
activity_comment

有关更多信息,请参阅认证和授权页面。

Request body

在请求体中,提供具有以下属性的 Activity.comment 资源:

Property nameValueDescriptionNotes
Required Properties
contentstring评论内容HTML文本

Response

如果成功,则此方法在响应正文中返回 Activity.comment 资源。

200 成功更新评论内容

{
    "data": {
        "content": "<p>哈哈哈</p>",
        "object_id": 7,
        "parent_id": null,
        "id": 21,
        "create_time": "2020-03-16T00:38:11.622981Z",
        "last_modified": "2020-03-17T07:31:53.485471Z",
        "deleted_at": null,
        "blocked_at": null,
        "user": {
            "uid": 6715983880802,
            "avatar": "http://127.0.0.1:8000/media/6715983880802/avatar/6715983880802.jpg",
            "expertise": "测试",
            "firstname": "淑珍",
            "lastname": "杨",
            "username": "淑珍 杨",
            "timezone": "Asia/Shanghai",
            "timezone_utc_offset": "+08:00",
            "online": false,
            "location": "CHN",
            "avatars": {
                "path": "http://127.0.0.1:8000/media/6715983880802/avatar/6715983880802.jpg",
                "sizes": {
                    "sm": {
                        "width": 32,
                        "height": 32,
                        "path": "http://127.0.0.1:8000/media/sm/6715983880802/avatar/6715983880802_32x32.JPEG" 
                    },
                    "md": {
                        "width": 64,
                        "height": 64,
                        "path": "http://127.0.0.1:8000/media/md/6715983880802/avatar/6715983880802_64x64.JPEG" 
                    },
                    "lg": {
                        "width": 300,
                        "height": 300,
                        "path": "http://127.0.0.1:8000/media/lg/6715983880802/avatar/6715983880802_300x300.JPEG" 
                    } 
                } 
            } 
        },
        "content_type": "event" 
    },
    "meta": null 
}

404 Not found

示例返回数据可参考 API Common – Resource Not Found

发表评论

您的电子邮箱地址不会被公开。

您可以使用以下 HTML标签和属性:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Captcha Code