public WoWTwitterArea(AREA area, AreaDbContext DB) { this.area = area; string wow_access_token = ""; string twitter_access_token = ""; string twitter_secret_token = ""; foreach (var token in DB.tokens) { if (token.type == "WoW" && token.username == area.username) { wow_access_token = token.value; } if (token.type == "TwitterAccessToken" && token.username == area.username) { twitter_access_token = token.value; } if (token.type == "TwitterAccessTokenSecret" && token.username == area.username) { twitter_secret_token = token.value; } } WoW = new WoWModuleModel(wow_access_token, area.index_action); Twitter = new TwitterModule(twitter_access_token, twitter_secret_token, area.index_reaction); }
public SpotifyTwitterArea(AREA area, AreaDbContext DB) { this.area = area; this.username = area.username; this.last_event = area.last_event; foreach (var token in DB.tokens) { if (token.type == "Spotify" && token.username == area.username) { spotifyToken = token.value; } if (token.type == "TwitterAccessToken" && token.username == area.username) { twitterToken = token.value; } if (token.type == "TwitterAccessTokenSecret" && token.username == area.username) { twitterTokenSecret = token.value; } } spotify = new SpotifyModule(spotifyToken, area.index_action); twitter = new TwitterModule(twitterToken, twitterTokenSecret, area.index_reaction); }
public FacebookTwitterArea(AREA area, AreaDbContext DB) { this.area = area; this.username = area.username; this.last_event = area.last_event; foreach (var token in DB.tokens) { if (token.type == "Facebook" && token.username == area.username) { FacebookToken = token.value; } if (token.type == "TwitterAccessToken" && token.username == area.username) { twitterToken = token.value; } if (token.type == "TwitterAccessTokenSecret" && token.username == area.username) { twitterTokenSecret = token.value; } } facebook = new FacebookModule(FacebookToken, area.index_action); twitter = new TwitterModule(twitterToken, twitterTokenSecret, area.index_reaction); }