File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 46
46
- [x] [ 点赞] ( http://jike-sdk.surge.sh/functions/api_posts.like.html )
47
47
- [x] [ 取消点赞] ( http://jike-sdk.surge.sh/functions/api_posts.unlike.html )
48
48
- [x] [ 获取点赞用户列表] ( http://jike-sdk.surge.sh/functions/api_posts.listLikedUsers.html )
49
+ - [x] [ 隐藏动态] ( http://jike-sdk.surge.sh/functions/api_posts.hide.html )
50
+ - [x] [ 动态转为公开] ( http://jike-sdk.surge.sh/functions/api_posts.recover.html )
49
51
- [ 动态广场] ( http://jike-sdk.surge.sh/modules/api_recommend_feed.html )
50
52
- [x] [ 获取动态推荐] ( http://jike-sdk.surge.sh/functions/api_recommend_feed.list.html )
51
53
- [ 评论] ( http://jike-sdk.surge.sh/modules/api_comments.html )
Original file line number Diff line number Diff line change @@ -106,3 +106,25 @@ export const listLikedUsers = <T = Posts.ListLikedUsersResponse>(
106
106
} ,
107
107
} )
108
108
)
109
+
110
+ /**
111
+ * 隐藏动态(仅会员)
112
+ * @param id 动态ID
113
+ */
114
+ export const hide = < T = Posts . HideResponse > ( type : PostType , id : string ) =>
115
+ toResponse < T > (
116
+ request . post ( `1.0/${ type } /sponsor/hide` , {
117
+ json : { id } ,
118
+ } )
119
+ )
120
+
121
+ /**
122
+ * 转为公开动态(仅会员)
123
+ * @param id 动态ID
124
+ */
125
+ export const recover = < T = Posts . HideResponse > ( type : PostType , id : string ) =>
126
+ toResponse < T > (
127
+ request . post ( `1.0/${ type } /sponsor/recover` , {
128
+ json : { id } ,
129
+ } )
130
+ )
Original file line number Diff line number Diff line change @@ -34,6 +34,18 @@ export namespace Posts {
34
34
data : User [ ]
35
35
loadMoreKey ?: string
36
36
}
37
+ export interface HideResponse {
38
+ /** 提示文本 */
39
+ toast : LiteralUnion < '已设置' >
40
+ isPrivate : boolean
41
+ privatizableStatus : LiteralUnion < 'ENABLE_RECOVER' >
42
+ }
43
+ export interface RecoverResponse {
44
+ /** 提示文本 */
45
+ toast : LiteralUnion < '已设置' >
46
+ isPrivate : boolean
47
+ privatizableStatus : LiteralUnion < 'ENABLE_HIDE' >
48
+ }
37
49
}
38
50
39
51
export namespace Notifications {
You can’t perform that action at this time.
0 commit comments