Class Notifier

java.lang.Object
de.presti.ree6.utils.apis.Notifier

public class Notifier extends Object
Utility class used for Event Notifiers. Such as Twitch Livestream, YouTube Upload or Twitter Tweet.
  • Constructor Details

    • Notifier

      public Notifier()
      Constructor used to created instance of the API Clients.
  • Method Details

    • createRssStream

      public void createRssStream()
      Creates an RSS Stream.
    • registerTwitchEventHandler

      public void registerTwitchEventHandler()
      Register a EventHandler for the Twitch Livestream Event.
    • registerTwitchChannel

      public void registerTwitchChannel(String twitchChannel)
      Used to Register a Livestream Event for the given Twitch Channel
      Parameters:
      twitchChannel - the Name of the Twitch Channel.
    • registerTwitchChannel

      public void registerTwitchChannel(List<String> twitchChannels)
      Used to Register a Livestream Event for the given Twitch Channels
      Parameters:
      twitchChannels - the Names of the Twitch Channels.
    • unregisterTwitchChannel

      public void unregisterTwitchChannel(String twitchChannel)
      Used to Unregister a Livestream Event for the given Twitch Channel
      Parameters:
      twitchChannel - the Name of the Twitch Channel.
    • isTwitchRegistered

      public boolean isTwitchRegistered(String twitchChannel)
      Check if a Twitch Channel is already being checked.
      Parameters:
      twitchChannel - the Name of the Twitch Channel.
      Returns:
      true, if there is an Event for the Channel | false, if there isn't an Event for the Channel.
    • registerTwitterUser

      public void registerTwitterUser(List<String> twitterUsers)
      Used to Register a Tweet Event for the given Twitter Users
      Parameters:
      twitterUsers - the Names of the Twitter Users.
    • registerTwitterUser

      public void registerTwitterUser(String twitterUser)
      Used to Register a Tweet Event for the given Twitter User
      Parameters:
      twitterUser - the Name of the Twitter User.
    • unregisterTwitterUser

      public void unregisterTwitterUser(String twitterUser)
      Used to Unregister a Tweet Event for the given Twitter User
      Parameters:
      twitterUser - the Name of the Twitter User.
    • isTwitterRegistered

      public boolean isTwitterRegistered(String twitterUser)
      Check if a Twitter User is already being checked.
      Parameters:
      twitterUser - the Name of the Twitter User.
      Returns:
      true, if there is an Event for the User | false, if there isn't an Event for the User.
    • createYTStream

      public void createYTStream()
      Create an API Stream used to update ChannelStats and Notifier of YT.
    • registerYouTubeChannel

      public void registerYouTubeChannel(String youtubeChannel)
      Used to register an Upload Event for the given YouTube Channel.
      Parameters:
      youtubeChannel - the Name of the YouTube Channel.
    • registerYouTubeChannel

      public void registerYouTubeChannel(List<String> youtubeChannels)
      Used to register an upload Event for the given YouTube Channels.
      Parameters:
      youtubeChannels - the Names of the YouTube Channels.
    • unregisterYouTubeChannel

      public void unregisterYouTubeChannel(String youtubeChannel)
      Used to unregister an Upload Event for the given YouTube Channel
      Parameters:
      youtubeChannel - the Name of the YouTube Channel.
    • isYouTubeRegistered

      public boolean isYouTubeRegistered(String youtubeChannel)
      Check if a YouTube Channel is already being checked.
      Parameters:
      youtubeChannel - the Name of the YouTube Channel.
      Returns:
      true, if there is an Event for the Channel | false, if there isn't an Event for the Channel.
    • createRedditPostStream

      public void createRedditPostStream()
      Used to register a Reddit-Post Event for all Subreddits.
    • getSubreddit

      public masecla.reddit4j.objects.subreddit.RedditSubreddit getSubreddit(String subreddit) throws IOException, InterruptedException
      Used to get a Subreddit.
      Parameters:
      subreddit - the Name of the Subreddit.
      Returns:
      the Subreddit.
      Throws:
      IOException - if the Subreddit couldn't be found.
      InterruptedException - if the Thread was interrupted.
    • registerSubreddit

      public void registerSubreddit(String subreddit)
      Used to register a Reddit-Post Event for the given Subreddit
      Parameters:
      subreddit - the Names of the Subreddit.
    • registerSubreddit

      public void registerSubreddit(List<String> subreddits)
      Used to register a Reddit-Post Event for the Subreddit.
      Parameters:
      subreddits - the Names of the Subreddits.
    • unregisterSubreddit

      public void unregisterSubreddit(String subreddit)
      Used to unregister a Reddit-Post Event for the given Subreddit.
      Parameters:
      subreddit - the Names of the Subreddit.
    • isSubredditRegistered

      public boolean isSubredditRegistered(String subreddit)
      Check if a Subreddit is already being checked.
      Parameters:
      subreddit - the Names of the Subreddit.
      Returns:
      true, if there is an Event for the Channel | false, if there isn't an Event for the Channel.
    • createInstagramPostStream

      public void createInstagramPostStream()
      Used to register an Instagram-Post Event for all Insta-Users.
    • registerInstagramUser

      public void registerInstagramUser(String username)
      Used to register an Instagram-Post Event for all Insta-Users.
      Parameters:
      username - the Names of the User.
    • registerInstagramUser

      public void registerInstagramUser(List<String> usernames)
      Used to register an Instagram-Post Event for all Insta-Users.
      Parameters:
      usernames - the Names of the Users.
    • unregisterInstagramUser

      public void unregisterInstagramUser(String username)
      Used to unregister an Instagram-Post Event for all Insta-Users.
      Parameters:
      username - the Names of the User.
    • isInstagramUserRegistered

      public boolean isInstagramUserRegistered(String username)
      Check if a User is already being checked.
      Parameters:
      username - the Names of the User.
      Returns:
      true, if there is an Event for the Channel | false, if there isn't an Event for the Channel.
    • createTikTokStream

      public void createTikTokStream()
      Used to create a Thread that handles TikTok notifications.
    • registerTikTokUser

      public void registerTikTokUser(long id)
      Used to register a TikTok User.
      Parameters:
      id - the ID of the TikTok User.
    • registerTikTokUser

      public void registerTikTokUser(List<Long> users)
      Used to register multiple TikTok Users.
      Parameters:
      users - the ID of the TikTok Users.
    • unregisterTikTokUser

      public void unregisterTikTokUser(long id)
      Used to unregister a TikTok User.
      Parameters:
      id - the ID of the TikTok User.
    • isTikTokUserRegistered

      public boolean isTikTokUserRegistered(long id)
      Check if a TikTok User is already being checked.
      Parameters:
      id - the Name of the TikTok User.
      Returns:
      true, if there is a User | false, if there isn't a User.
    • registerRSS

      public void registerRSS(String rssUrl)
      Used to register an RSS Feed.
      Parameters:
      rssUrl - the Url of the RSS-Feed.
    • registerRSS

      public void registerRSS(List<String> rssUrls)
      Used to register an RSS Feed.
      Parameters:
      rssUrls - the Urls of the RSS-Feeds.
    • unregisterRSS

      public void unregisterRSS(String rssUrl)
      Used to unregister an RSS Feed.
      Parameters:
      rssUrl - the Url of the RSS-Feed.
    • isRSSRegistered

      public boolean isRSSRegistered(String rssUrl)
      Check if an RSS-Feed is already being checked.
      Parameters:
      rssUrl - the Url of the RSS-Feed.
      Returns:
      true, if there is an Url | false, if there isn't an Url.