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 3535 - [x] [ 是否关注用户] ( http://jike-sdk.surge.sh/classes/index.JikeUser.html#isFollowing )
3636 - [x] [ 不看 TA 的内容] ( http://jike-sdk.surge.sh/functions/api_user_relation.mute.html )
3737 - [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 )
3840- [ 动态帖子] ( http://jike-sdk.surge.sh/modules/api_posts.html )
3941 - [x] [ 发送动态] ( http://jike-sdk.surge.sh/functions/api_posts.create.html )
4042 - [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) =>
108108 } ,
109109 } )
110110 )
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 {
7171 export interface UnmuteResponse {
7272 toast : LiteralUnion < '操作成功!' >
7373 }
74+ export interface AddBlockResponse {
75+ toast : LiteralUnion < '已将其加入黑名单' >
76+ }
77+ export interface RemoveBlockResponse {
78+ toast : LiteralUnion < '已将其解除黑名单' >
79+ }
7480}
7581
7682export namespace Users {
You can’t perform that action at this time.
0 commit comments