Dimzou: Publication: User

Dimzou: Publication: User

获取指定用户相关的出版物。

Request

HTTP request

GET /api/dimzou/publication/user/{uid}/

Parameters

Path

uid: 指定用户的uid

Query

roleArray[Collaborator.Role]指定用户在Publication的章节中的role。默认返回所有role。
多个role使用role=0&role=100&role=200或role[]=0&role[]=100&role[]=200的方式传。
例如:
用户是所有者的Publication:role=0
用户不是所有者但是参与了的Bundle:role=100&role=200
latestbool是否只返回最新版的出版物。默认为false,返回所有版本的出版物
origin_onlybool是否只返回非翻译出版物。默认为false,返回所有出版物。注意为true时只返回用户参与的非翻译出版物;用户只参与翻译,未参与原文创作的出版物不会返回。

支持通用分页参数。

Response

200

返回结果类似feed items,额外添加了一些field:

  • bundle.copy_version
  • bundle.draft_version
  • role
    • 指定用户在此出版物对应章节中的role
  • language
    • 此出版物的语言
  • authors
    • 目前是汇总了出版物对应章节的协作者中未被删除且有参与记录的用户uid
    • 按照role、joined_at升序排列
{
    "pagination": {
        "page_size": 2,
        "total_count": 23,
        "total_pages": 12,
        "current_page": 1,
        "next": 2,
        "previous": null
    },
    "data": [
        {
            "id": 2458,
            "bundle_id": 8508,
            "node_id": 8864,
            "title": "测试翻译和出版",
            "content": "测试翻译和出版",
            "pub_type": 0,
            "cover_image": "https://10.0.10.117:8013/media/7815769374283/dimzou/publication/20220920_787229F_cover.png",
            "cover_images": {
                "path": "https://10.0.10.117:8013/media/7815769374283/dimzou/publication/20220920_787229F_cover.png",
                "sizes": {
                    "cover_sm": {
                        "width": 300.0,
                        "height": 300.0,
                        "path": "https://10.0.10.117:8013/media/cover_sm/7815769374283/dimzou/publication/20220920_787229F_cover_300x300.JPEG"
                    },
                    "cover_md": {
                        "width": 1200.0,
                        "height": null,
                        "path": "https://10.0.10.117:8013/media/cover_md/7815769374283/dimzou/publication/20220920_787229F_cover_x1200.JPEG"
                    }
                }
            },
            "author": 7815769374283,
            "update_at": "2022-09-20T02:42:26.713860Z",
            "bundle": {
                "first_original_id": null,
                "original_id": null,
                "copy_version": 0,
                "draft_version": 1
            },
            "role": 0,
            "language": "zh-CN",
            "authors": [
                7815769374283
            ],
            "localized": {
                "title": "Test translation and publishing",
                "content": "Test translation and publishing",
                "language": "en"
            }
        },
        {
            "id": 2333,
            "bundle_id": 8202,
            "node_id": 8553,
            "title": "test2",
            "content": "test2022",
            "pub_type": 0,
            "cover_image": "https://10.0.10.117:8013/media/7815769374283/dimzou/reword/300/20220104_C500FB6_cropped_image.jpg",
            "cover_images": {
                "path": "https://10.0.10.117:8013/media/7815769374283/dimzou/reword/300/20220104_C500FB6_cropped_image.jpg",
                "sizes": {
                    "cover_sm": {
                        "width": 300.0,
                        "height": 300.0,
                        "path": "https://10.0.10.117:8013/media/cover_sm/7815769374283/dimzou/reword/300/20220104_C500FB6_cropped_image_300x300.JPEG"
                    },
                    "cover_md": {
                        "width": 1200.0,
                        "height": null,
                        "path": "https://10.0.10.117:8013/media/cover_md/7815769374283/dimzou/reword/300/20220104_C500FB6_cropped_image_x1200.JPEG"
                    }
                }
            },
            "author": 7815769374283,
            "update_at": "2022-05-17T06:18:51.273024Z",
            "bundle": {
                "first_original_id": 7878,
                "original_id": 8201,
                "copy_version": 4,
                "draft_version": 1
            },
            "role": 0,
            "language": "zh-CN",
            "authors": [
                7815769374283,
                3120595892220
            ],
            "localized": {
                "title": "test2",
                "content": "test2022",
                "language": "en"
            }
        }
    ]
}

发表评论

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

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

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

Captcha Code