浏览代码

add unmute, unblock, follow actions to twitter provider

Carsten Porth 6 年之前
父节点
当前提交
54b111c67d
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      app/src/providers/twitter-api/twitter-api.ts

+ 12 - 0
app/src/providers/twitter-api/twitter-api.ts

@@ -66,6 +66,10 @@ export class TwitterApiProvider {
     return res.data;
   }
 
+  public async createFriendship(userId) {
+    return await this.client.post("friendships/create", { user_id: userId });
+  }
+
   public async destroyFriendship(userId) {
     return await this.client.post("friendships/destroy", { user_id: userId });
   }
@@ -74,10 +78,18 @@ export class TwitterApiProvider {
     return await this.client.post("mutes/users/create", { user_id: userId });
   }
 
+  public async unmuteUser(userId) {
+    return await this.client.post("mutes/users/destroy", { user_id: userId });
+  }
+
   public async blockUser(userId) {
     return await this.client.post("blocks/create", { user_id: userId });
   }
 
+  public async unblockUser(userId) {
+    return await this.client.post("blocks/destroy", { user_id: userId });
+  }
+
   public async tweet(status) {
     return await this.client.post("statuses/update", { status: status });
   }