twitchalerts 0.1.1

A crate which when it detect that a streamer is live which trigger the event handler, more features to be added.
Documentation
1
2
3
4
5
6
7
8
use async_trait::async_trait;
use crate::client::{StreamData, Streamer};

#[async_trait]
pub trait EventHandler: Send + Sync + 'static {
    async fn on_stream(&self, streamer: &Streamer, stream: &StreamData) {}
    async fn on_error(&self, error: String) {}
}