Bundle: uploadCoverImg

Bundle: uploadCoverImg

上传章节封面图片。

Request

HTTP request

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

Parameters

  • Path parameters
Parameter nameValueDescription
idstringBundle(book) ID
  • Query parameters
Parameter nameValueDescription
Required parameters
nodestring章节id

授权

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

Scopes
dimzou_bundle

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

Request body

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

Property nameValueDescriptionNotes
Required Properties
reword_idintegerReword ID, 基于之前版本的reword进行修改(这里指基于之前版本的封面图进行裁剪)
template_confignested object封面模版
Optional Properties
imgfile段落为图片
crop_imgfile裁剪后的图片, 需要提交之前版本的封面图(即reword_id参数)作为原图

Response

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

200 上传成功

{
    "data": {
        "id": 3984705,
        "sort": null,
        "info": null,
        "node_id": 108111,
        "rewordings": [
            {
                "id": 2961774,
                "user":{
                },
                "type": 300,
                "content": null,
                "html_content": null,
                "img": "https://pic1.feat.com/media/4416382589854/dimzou/reword/300/20200323_BF13528_%E4%B8%8B%E8%BD%BD2.png",
                "imgs": {
                    "path": "https://pic1.feat.com/media/4416382589854/dimzou/reword/300/20200323_BF13528_%E4%B8%8B%E8%BD%BD2.png",
                    "sizes": {
                        "cover_sm": {
                            "width": 300,
                            "height": 300,
                            "path": "https://pic1.feat.com/media/cover_sm/4416382589854/dimzou/reword/300/20200323_BF13528_%E4%B8%8B%E8%BD%BD2_300x300.JPEG" 
                        } 
                    } 
                },
                "crop_img": "https://pic1.feat.com/media/4416382589854/dimzou/reword/300/20200323_A071EDE_blob",
                "crop_imgs": {
                    "path": "https://pic1.feat.com/media/4416382589854/dimzou/reword/300/20200323_A071EDE_blob",
                    "sizes": {
                        "cover_sm": {
                            "width": 300,
                            "height": 300,
                            "path": "https://pic1.feat.com/media/cover_sm/4416382589854/dimzou/reword/300/20200323_A071EDE_blob_300x300.JPEG" 
                        } 
                    } 
                },
                "status": 100,
                "version": 1,
                "last_modified": "2020-03-23T03:02:42.956184Z",
                "create_time": "2020-03-23T03:02:42.947916Z",
                "is_selected": true,
                "content_meta": null,
                "base_on": null,
                "comments_count": 0,
                "likes_count": 0,
                "template_config": {
                    "I": {
                        "cropData": {
                            "x": 0,
                            "y": 0,
                            "width": 238.99999999999997,
                            "height": 107.55,
                            "rotate": 0,
                            "scaleX": 1,
                            "scaleY": 1 
                        } 
                    } 
                },
                "media_type": 0,
                "img_height": 211,
                "img_width": 239,
                "file": null,
                "file_info": null,
                "submit_version": 1,
                "comments": [],
                "version_lock": false 
            }] 
    } 
}

400 Submitted data error

示例返回数据可参考 API Common – Validation Exception

401 Permission Deny

示例返回数据可参考 API Common – Authorization Failed

发表评论

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

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

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

Captcha Code