Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }