Package tv.phantombot.cache
Class FollowersCache
java.lang.Object
tv.phantombot.cache.FollowersCache
Periodically checks the API for new followers
- Author:
- gmt2001
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a follow to the cache, and sends notifications if necessaryvoid
Adds a follow to the cache, and sends notifications if necessaryvoid
addFollow
(String loginName, ZonedDateTime followedAt) Adds a follow to the cache, and sends notifications if necessaryvoid
addFollow
(String loginName, ZonedDateTime followedAt, boolean silent) Adds a follow to the cache, and sends notifications if necessaryboolean
Indicates if the specified user has followed at some point in the past, within the limits of the bots recordsfollowedDate
(String loginName) Indicates the earliest timestamp when the bot is aware of the specified user followingfollowedDateString
(String loginName) Indicates the earliest timestamp when the bot is aware of the specified user following as a stringboolean
Indicates if the specified user currently follows the channelstatic FollowersCache
instance()
void
kill()
int
total()
Returns the total number of followers, according to Twitch API
-
Method Details
-
instance
-
addFollow
Adds a follow to the cache, and sends notifications if necessary- Parameters:
loginName
- The login name of the followerfollowedAt
- The ISO8601 timestamp when the follow ocurred
-
addFollow
Adds a follow to the cache, and sends notifications if necessary- Parameters:
loginName
- The login name of the followerfollowedAt
- The ISO8601 timestamp when the follow ocurredsilent
- Iftrue
, don't announce the follow
-
addFollow
Adds a follow to the cache, and sends notifications if necessary- Parameters:
loginName
- The login name of the followerfollowedAt
- The ISO8601 timestamp when the follow ocurred
-
addFollow
Adds a follow to the cache, and sends notifications if necessary- Parameters:
loginName
- The login name of the followerfollowedAt
- The ISO8601 timestamp when the follow ocurredsilent
- Iftrue
, don't announce the follow
-
total
public int total()Returns the total number of followers, according to Twitch API- Returns:
-
follows
Indicates if the specified user currently follows the channel- Parameters:
loginName
- The login name of the user- Returns:
-
followed
Indicates if the specified user has followed at some point in the past, within the limits of the bots records- Parameters:
loginName
- The login name of the user- Returns:
-
followedDateString
Indicates the earliest timestamp when the bot is aware of the specified user following as a string- Parameters:
loginName
- The login name of the user- Returns:
-
followedDate
Indicates the earliest timestamp when the bot is aware of the specified user following- Parameters:
loginName
- The login name of the user- Returns:
-
kill
public void kill()
-