コード例 #1
0
 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);
 }
コード例 #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);
        }
コード例 #3
0
        public GithubFacebookArea(AREA area, AreaDbContext DB)
        {
            this.area = area;
            string github_access_token   = "";
            string facebook_access_token = "";

            foreach (var token in DB.tokens)
            {
                if (token.type == "Github" && token.username == area.username)
                {
                    github_access_token = token.value;
                }
                if (token.type == "Facebook" && token.username == area.username)
                {
                    facebook_access_token = token.value;
                }
            }
            Github   = new GithubModuleModel(github_access_token, area.index_action);
            Facebook = new FacebookModule(facebook_access_token, area.index_reaction);
        }
コード例 #4
0
 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);
 }
コード例 #5
0
 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);
 }