public FacebookSpotifyArea(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 == "Facebook" && token.username == area.username) { facebookToken = token.value; } } spotify = new SpotifyModule(spotifyToken, area.index_reaction); facebook = new FacebookModule(facebookToken, area.index_action); }
public WoWSpotifyArea(AREA area, AreaDbContext DB) { this.area = area; string wow_access_token = ""; string spotify_access_token = ""; foreach (var token in DB.tokens) { if (token.type == "WoW" && token.username == area.username) { wow_access_token = token.value; } if (token.type == "Spotify" && token.username == area.username) { spotify_access_token = token.value; } } WoW = new WoWModuleModel(wow_access_token, area.index_action); Spotify = new SpotifyModule(spotify_access_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); }