Bundle: collaborator

Bundle: collaborator

添加合作者到该章节/ 更新该章节的合作者身份。

Request

HTTP request

POST https://www.featapi.com/api/dimzou/bundle/{id}/collaborator/

Parameters

  • Path parameters
Parameter nameValueDescription
idstring章节的bundle id

授权

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

Scopes
dimzou_bundle

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

Request body

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

Property nameValueDescriptionNotes
Required Properties
nodeinteger章节id
roleenum仅允许新增admin/participatorCollaborator.Role
uidinteger用户uidUser.Profile

Response

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

200 添加合作者成功

{
    "data": {
        "id": 7674,
        "role": 100,
        "user_id": 3216362344074,
        "joined_at": null,
        "created_at": "2020-03-23T08:33:49.621428Z",
        "user": {
            "uid": 3216362344074,
            "avatar": "https://10.0.10.117:8003/media/storage/avatars/7u9v2H6PllUMGRqIFWhWRD3BqSIbWXR87B2uZ5Ks.jpeg",
            "expertise": "做励志演讲",
            "firstname": "方新",
            "lastname": "赵",
            "username": "赵 方新",
            "timezone": null,
            "timezone_utc_offset": null,
            "online": false,
            "location": null,
            "avatars": {
                "path": "https://10.0.10.117:8003/media/storage/avatars/7u9v2H6PllUMGRqIFWhWRD3BqSIbWXR87B2uZ5Ks.jpeg",
                "sizes": {
                    "sm": {
                        "width": 32,
                        "height": 32,
                        "path": "https://10.0.10.117:8003/media/sm/storage/avatars/7u9v2H6PllUMGRqIFWhWRD3BqSIbWXR87B2uZ5Ks_32x32.JPEG" 
                    },
                    "md": {
                        "width": 64,
                        "height": 64,
                        "path": "https://10.0.10.117:8003/media/md/storage/avatars/7u9v2H6PllUMGRqIFWhWRD3BqSIbWXR87B2uZ5Ks_64x64.JPEG" 
                    },
                    "lg": {
                        "width": 300,
                        "height": 300,
                        "path": "https://10.0.10.117:8003/media/lg/storage/avatars/7u9v2H6PllUMGRqIFWhWRD3BqSIbWXR87B2uZ5Ks_300x300.JPEG" 
                    } 
                } 
            } 
        },
        "bundle_id": 7260,
        "is_deleted": false 
    } 
}

404 Not found

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

Party Message

新添加协作者的时候,被添加者会收到一条添加者发送的邀请消息,message_type是3650。

{
  "id": 5459,
  "from_user": 3120595892220,
  "from_name": "melanie c",
  "to_user": 7815769374283,
  "to_name": "Yang WenWei",
  "to_group": None,
  "message_type": 3650,
  "send_time": "2022-06-07T05:42:34.091Z",
  "location": None,
  "timezone": None,
  "detail": {
    "bundle": {
      "id": 8206,
      "owner": 3120595892220,
      "title": "YWW"
      },
    "node": {
      "id": 8557,
      "user": 3120595892220,
      "title": "YWW"
      }
    },
  "task_id": "pJk8ds9cQgAO"
}

发表评论

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

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

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

Captcha Code