POST api/v1/User/UserCollectionAdd
[需登录]添加收藏
请求信息(Request)
URI 参数
None.
Body 参数
UserCollectionDTO| 名称 | 描述 | 类型 | 备注 |
|---|---|---|---|
| ID |
收藏ID |
integer |
None. |
| Title |
标题 |
string |
None. |
| UserId |
用户ID |
integer |
None. |
| CreateTime |
建立日期 |
date |
None. |
| ItemId |
收藏内容ID |
integer |
Required |
| Content |
收藏内容 |
string |
None. |
| Type |
收藏类型 |
BusinessType |
None. |
| TypeName |
收藏类型名称 |
string |
None. |
| ImagePath |
图片 |
string |
None. |
请求格式
application/json, text/json
Sample:
{
"ID": 1,
"Title": "sample string 2",
"UserId": 3,
"CreateTime": "2025-11-06T04:07:10.3624547+08:00",
"ItemId": 5,
"Content": "sample string 6",
"Type": 0,
"TypeName": "sample string 7",
"ImagePath": "sample string 8"
}
application/xml, text/xml
Sample:
<UserCollectionDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WLife.Application.DTOs"> <Content>sample string 6</Content> <CreateTime>2025-11-06T04:07:10.3624547+08:00</CreateTime> <ID>1</ID> <ImagePath>sample string 8</ImagePath> <ItemId>5</ItemId> <Title>sample string 2</Title> <Type>None</Type> <TypeName>sample string 7</TypeName> <UserId>3</UserId> </UserCollectionDTO>
application/x-www-form-urlencoded
Sample:
响应信息(Response)
资源描述
RequestResultOfInt32| 名称 | 描述 | 类型 | 备注 |
|---|---|---|---|
| Data | integer |
None. |
|
| Status |
状态(0:成功,1:失败) |
integer |
None. |
| Message |
导致失败的相关消息 |
string |
None. |
| Total |
集合总数,用于分页时使用 |
integer |
None. |
响应格式
application/json, text/json
Sample:
{
"Data": 1,
"Status": 2,
"Message": "sample string 3",
"Total": 4
}
application/xml, text/xml
Sample:
<RequestResultOfint xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WLife.Application"> <Message>sample string 3</Message> <Status>2</Status> <Total>4</Total> <Data>1</Data> </RequestResultOfint>