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 35
35
- [x] [ 是否关注用户] ( http://jike-sdk.surge.sh/classes/index.JikeUser.html#isFollowing )
36
36
- [x] [ 不看 TA 的内容] ( http://jike-sdk.surge.sh/functions/api_user_relation.mute.html )
37
37
- [x] [ 重新看 TA 的内容] ( http://jike-sdk.surge.sh/functions/api_user_relation.unmute.html )
38
+ - [x] [ 加入黑名单] ( http://jike-sdk.surge.sh/functions/api_user_relation.addBlock.html )
39
+ - [x] [ 解除黑名单] ( http://jike-sdk.surge.sh/functions/api_user_relation.removeBlock.html )
38
40
- [ 动态帖子] ( http://jike-sdk.surge.sh/modules/api_posts.html )
39
41
- [x] [ 发送动态] ( http://jike-sdk.surge.sh/functions/api_posts.create.html )
40
42
- [x] [ 获取动态详情] ( http://jike-sdk.surge.sh/functions/api_posts.get.html )
Original file line number Diff line number Diff line change @@ -108,3 +108,31 @@ export const unmute = <T = UserRelation.UnmuteResponse>(userId: string) =>
108
108
} ,
109
109
} )
110
110
)
111
+
112
+ /**
113
+ * 加入黑名单
114
+ * @param username 用户名
115
+ */
116
+ export const addBlock = < T = UserRelation . AddBlockResponse > ( username : string ) =>
117
+ toResponse < T > (
118
+ request . post ( '1.0/userRelation/addBlock' , {
119
+ json : {
120
+ username,
121
+ } ,
122
+ } )
123
+ )
124
+
125
+ /**
126
+ * 解除黑名单
127
+ * @param username 用户名
128
+ */
129
+ export const removeBlock = < T = UserRelation . RemoveBlockResponse > (
130
+ username : string
131
+ ) =>
132
+ toResponse < T > (
133
+ request . post ( '1.0/userRelation/removeBlock' , {
134
+ json : {
135
+ username,
136
+ } ,
137
+ } )
138
+ )
Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ export namespace UserRelation {
71
71
export interface UnmuteResponse {
72
72
toast : LiteralUnion < '操作成功!' >
73
73
}
74
+ export interface AddBlockResponse {
75
+ toast : LiteralUnion < '已将其加入黑名单' >
76
+ }
77
+ export interface RemoveBlockResponse {
78
+ toast : LiteralUnion < '已将其解除黑名单' >
79
+ }
74
80
}
75
81
76
82
export namespace Users {
You can’t perform that action at this time.
0 commit comments