ImageApi.update

注意:该接口需要管理员权限才能调用。

更新指定图片信息。

方法定义

ImageApi.update(param: UpdateParams): Promise<ImageResponse>

参数

UpdateParams ImageApi.ts:66

参数名 必选 类型 说明
filename string

图片文件名

include string

响应中需要包含的关联数据,用 , 分隔。可以为 user, question, article, answer

key string

图片key

响应

ImageResponse models.ts:527

参数名 类型 说明
code number

无任何错误时,状态码为 0

data Image

Image models.ts:478

参数名 类型 说明
create_time number

图片上传时间

filename string

图片原始文件名

height number

原始图片高度

item_id number

图片关联对象ID

item_type string

图片关联对象类型

取值范围包括:questionanswerarticle

key string

图片的 key

relationships ImageRelationship
urls ImageUrls
user_id number

图片上传者ID

width number

原始图片宽度

ImageRelationship models.ts:520

参数名 类型 说明
answer AnswerInRelationship
article ArticleInRelationship
question QuestionInRelationship
user UserInRelationship

ImageUrls models.ts:549

参数名 类型 说明
original string

原图地址

release string

宽度固定,高度自适应的图片地址

thumb string

固定宽高的缩略图地址

AnswerInRelationship models.ts:53

参数名 类型 说明
answer_id number

回答ID

content_summary string

内容摘要

create_time number

发布时间

question_id number

提问ID

update_time number

更新时间

ArticleInRelationship models.ts:193

参数名 类型 说明
article_id number

文章ID

create_time number

发布时间

title string

文章标题

update_time number

更新时间

QuestionInRelationship models.ts:1536

参数名 类型 说明
create_time number

发布时间

question_id number

提问ID

title string

提问标题

update_time number

更新时间

UserInRelationship models.ts:2162

参数名 类型 说明
avatar UserAvatar
headline string

一句话介绍

user_id number

用户ID

username string

用户名

UserAvatar models.ts:2094

参数名 类型 说明
large string

大头像地址

middle string

中头像地址

original string

头像原图地址

small string

小头像地址