◆ FollowerService()
TwitchLib.Api.Services.FollowerService.FollowerService |
( |
ITwitchAPI |
api, |
|
|
int |
checkIntervalInSeconds = 60 , |
|
|
int |
queryCountPerRequest = 100 , |
|
|
int |
cacheSize = 1000 , |
|
|
bool |
invokeEventsOnStartup = false |
|
) |
| |
FollowerService constructor.
- Exceptions
-
ArgumentNullException | When the api is null. |
ArgumentException | When the checkIntervalInSeconds is lower than one second. |
ArgumentException | When the queryCountPerRequest is less than 1 or more than 100 followers per request. |
ArgumentException | When the cacheSize is less than the queryCountPerRequest. |
- Parameters
-
api | The api to use for querying followers. |
checkIntervalInSeconds | How often new followers should be queried. |
queryCountPerRequest | The amount of followers to query per request. |
cacheSize | The maximum amount of followers to cache per channel. |
invokeEventsOnStartup | Whether to invoke the update events on startup or not. |
◆ ClearCache()
void TwitchLib.Api.Services.FollowerService.ClearCache |
( |
| ) |
|
Clears the existing cache.
◆ OnServiceTimerTick()
override async Task TwitchLib.Api.Services.FollowerService.OnServiceTimerTick |
( |
| ) |
|
|
protectedvirtual |
◆ SetChannelsById()
void TwitchLib.Api.Services.FollowerService.SetChannelsById |
( |
List< string > |
channelsToMonitor | ) |
|
Sets the channels to monitor by id. Event's channel properties will be Ids in this case.
- Exceptions
-
ArgumentNullException | When channelsToMonitor is null. |
ArgumentException | When channelsToMonitor is empty. |
- Parameters
-
channelsToMonitor | A list with channels to monitor. |
◆ SetChannelsByName()
void TwitchLib.Api.Services.FollowerService.SetChannelsByName |
( |
List< string > |
channelsToMonitor | ) |
|
Sets the channels to monitor by name. Event's channel properties will be names in this case.
- Exceptions
-
ArgumentNullException | When channelsToMonitor is null. |
ArgumentException | When channelsToMonitor is empty. |
- Parameters
-
channelsToMonitor | A list with channels to monitor. |
◆ UpdateLatestFollowersAsync()
async Task TwitchLib.Api.Services.FollowerService.UpdateLatestFollowersAsync |
( |
bool |
callEvents = true | ) |
|
Updates the followerservice with the latest followers. Automatically called internally when service is started.
- Parameters
-
callEvents | Whether to invoke the update events or not. |
◆ CacheSize
int TwitchLib.Api.Services.FollowerService.CacheSize |
|
get |
The maximum amount of followers cached per channel.
◆ KnownFollowers
Dictionary<string, List<Follow> > TwitchLib.Api.Services.FollowerService.KnownFollowers = new Dictionary<string, List<Follow>>(StringComparer.OrdinalIgnoreCase) |
|
get |
The current known followers for each channel.
◆ QueryCountPerRequest
int TwitchLib.Api.Services.FollowerService.QueryCountPerRequest |
|
get |
The amount of followers queried per request.
◆ OnNewFollowersDetected
Event which is called when new followers are detected.
The documentation for this class was generated from the following file: