refactor: Adjust architecture for twitter client and user tweet trigger

This commit is contained in:
Faruk AYDIN
2022-08-10 22:46:40 +03:00
parent a4abd7e1cd
commit bb68b2dea1
12 changed files with 305 additions and 108 deletions

View File

@@ -1,13 +1,12 @@
import { IJSONObject } from '@automatisch/types';
import MyTweet from './triggers/my-tweet';
import SearchTweet from './triggers/search-tweet';
import TwitterClient from './client';
import UserTweet from './triggers/user-tweet';
export default class Triggers {
myTweet: MyTweet;
searchTweet: SearchTweet;
client: TwitterClient;
userTweet: UserTweet;
constructor(connectionData: IJSONObject, parameters: IJSONObject) {
this.myTweet = new MyTweet(connectionData);
this.searchTweet = new SearchTweet(connectionData, parameters);
constructor(client: TwitterClient) {
this.client = client;
this.userTweet = new UserTweet(client);
}
}