Package de.presti.ree6.utils.apis
Class Notifier
java.lang.Object
de.presti.ree6.utils.apis.Notifier
Utility class used for Event Notifiers. Such as Twitch Livestream, YouTube Upload or Twitter Tweet.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Used to register an Instagram-Post Event for all Insta-Users.void
Used to register a Reddit-Post Event for all Subreddits.void
Creates an RSS Stream.void
Used to create a Thread that handles TikTok notifications.void
Create an API Stream used to update ChannelStats and Notifier of YT.masecla.reddit4j.objects.subreddit.RedditSubreddit
getSubreddit
(String subreddit) Used to get a Subreddit.boolean
isInstagramUserRegistered
(String username) Check if a User is already being checked.boolean
isRSSRegistered
(String rssUrl) Check if an RSS-Feed is already being checked.boolean
isSubredditRegistered
(String subreddit) Check if a Subreddit is already being checked.boolean
isTikTokUserRegistered
(long id) Check if a TikTok User is already being checked.boolean
isTwitchRegistered
(String twitchChannel) Check if a Twitch Channel is already being checked.boolean
isTwitterRegistered
(String twitterUser) Check if a Twitter User is already being checked.boolean
isYouTubeRegistered
(String youtubeChannel) Check if a YouTube Channel is already being checked.void
registerInstagramUser
(String username) Used to register an Instagram-Post Event for all Insta-Users.void
registerInstagramUser
(List<String> usernames) Used to register an Instagram-Post Event for all Insta-Users.void
registerRSS
(String rssUrl) Used to register an RSS Feed.void
registerRSS
(List<String> rssUrls) Used to register an RSS Feed.void
registerSubreddit
(String subreddit) Used to register a Reddit-Post Event for the given Subredditvoid
registerSubreddit
(List<String> subreddits) Used to register a Reddit-Post Event for the Subreddit.void
registerTikTokUser
(long id) Used to register a TikTok User.void
registerTikTokUser
(List<Long> users) Used to register multiple TikTok Users.void
registerTwitchChannel
(String twitchChannel) Used to Register a Livestream Event for the given Twitch Channelvoid
registerTwitchChannel
(List<String> twitchChannels) Used to Register a Livestream Event for the given Twitch Channelsvoid
Register a EventHandler for the Twitch Livestream Event.void
registerTwitterUser
(String twitterUser) Used to Register a Tweet Event for the given Twitter Uservoid
registerTwitterUser
(List<String> twitterUsers) Used to Register a Tweet Event for the given Twitter Usersvoid
registerYouTubeChannel
(String youtubeChannel) Used to register an Upload Event for the given YouTube Channel.void
registerYouTubeChannel
(List<String> youtubeChannels) Used to register an upload Event for the given YouTube Channels.void
unregisterInstagramUser
(String username) Used to unregister an Instagram-Post Event for all Insta-Users.void
unregisterRSS
(String rssUrl) Used to unregister an RSS Feed.void
unregisterSubreddit
(String subreddit) Used to unregister a Reddit-Post Event for the given Subreddit.void
unregisterTikTokUser
(long id) Used to unregister a TikTok User.void
unregisterTwitchChannel
(String twitchChannel) Used to Unregister a Livestream Event for the given Twitch Channelvoid
unregisterTwitterUser
(String twitterUser) Used to Unregister a Tweet Event for the given Twitter Uservoid
unregisterYouTubeChannel
(String youtubeChannel) Used to unregister an Upload Event for the given YouTube Channel
-
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
Used to Register a Livestream Event for the given Twitch Channel- Parameters:
twitchChannel
- the Name of the Twitch Channel.
-
registerTwitchChannel
Used to Register a Livestream Event for the given Twitch Channels- Parameters:
twitchChannels
- the Names of the Twitch Channels.
-
unregisterTwitchChannel
Used to Unregister a Livestream Event for the given Twitch Channel- Parameters:
twitchChannel
- the Name of the Twitch Channel.
-
isTwitchRegistered
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
Used to Register a Tweet Event for the given Twitter Users- Parameters:
twitterUsers
- the Names of the Twitter Users.
-
registerTwitterUser
Used to Register a Tweet Event for the given Twitter User- Parameters:
twitterUser
- the Name of the Twitter User.
-
unregisterTwitterUser
Used to Unregister a Tweet Event for the given Twitter User- Parameters:
twitterUser
- the Name of the Twitter User.
-
isTwitterRegistered
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
Used to register an Upload Event for the given YouTube Channel.- Parameters:
youtubeChannel
- the Name of the YouTube Channel.
-
registerYouTubeChannel
Used to register an upload Event for the given YouTube Channels.- Parameters:
youtubeChannels
- the Names of the YouTube Channels.
-
unregisterYouTubeChannel
Used to unregister an Upload Event for the given YouTube Channel- Parameters:
youtubeChannel
- the Name of the YouTube Channel.
-
isYouTubeRegistered
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
Used to register a Reddit-Post Event for the given Subreddit- Parameters:
subreddit
- the Names of the Subreddit.
-
registerSubreddit
Used to register a Reddit-Post Event for the Subreddit.- Parameters:
subreddits
- the Names of the Subreddits.
-
unregisterSubreddit
Used to unregister a Reddit-Post Event for the given Subreddit.- Parameters:
subreddit
- the Names of the Subreddit.
-
isSubredditRegistered
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
Used to register an Instagram-Post Event for all Insta-Users.- Parameters:
username
- the Names of the User.
-
registerInstagramUser
Used to register an Instagram-Post Event for all Insta-Users.- Parameters:
usernames
- the Names of the Users.
-
unregisterInstagramUser
Used to unregister an Instagram-Post Event for all Insta-Users.- Parameters:
username
- the Names of the User.
-
isInstagramUserRegistered
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
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
Used to register an RSS Feed.- Parameters:
rssUrl
- the Url of the RSS-Feed.
-
registerRSS
Used to register an RSS Feed.- Parameters:
rssUrls
- the Urls of the RSS-Feeds.
-
unregisterRSS
Used to unregister an RSS Feed.- Parameters:
rssUrl
- the Url of the RSS-Feed.
-
isRSSRegistered
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.
-