Browse Source

add unmute, unblock, follow actions to twitter provider

Carsten Porth 6 years ago
parent
commit
54b111c67d
1 changed files with 12 additions and 0 deletions
  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 });
   }