Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification on some events #41

Open
adamsingle opened this issue Aug 30, 2018 · 2 comments
Open

Clarification on some events #41

adamsingle opened this issue Aug 30, 2018 · 2 comments

Comments

@adamsingle
Copy link

I notice that there is the Follower Service that has an OnNewFollowersDetected event. I also notice the the PubSub service has an OnFollow event. I'm trying to make a game that links to a players twitch and can recognise, in game, when the player has a new follower. Will either of these do this? Or are both these events referring to the bots account? Same for things like bits received, is that referring to the bot or the channel? If that is the case, is there a way to authenticate with the players account to do what I'm trying to do?

@swiftyspiffy
Copy link
Member

If you want real time data on follow activities, you're likely interested in the pubsub implementation. In that case, Twitch dispatches a message immediately after the follow event and you can act on it.

The follower service basically polls the Twitch API every X seconds and checks if a new follower exists. If you don't need absolute real time, and a couple seconds of latency is ok, this solution is fine.

It basically comes down to how you want your app to work. If you don't mind a persistent connection to Twitch, and require absolute real time, then pubsub solution.

If you don't want to maintain a persistent connection, and want to check in with twitch ever couple seconds, the follower service solution is what you want.

@kicksent
Copy link

kicksent commented Oct 6, 2019

Can this be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants