|
| 1 | +# Streamlabs Arduino Alerts |
| 2 | +A work in progress library to connect to your Streamlabs account and catch all the Twitch events. |
| 3 | + |
| 4 | +## Twitch event catchable |
| 5 | + |
| 6 | + - Follow |
| 7 | + - Subscription |
| 8 | + - Donation |
| 9 | + - Raid |
| 10 | + - Host |
| 11 | + - Bit |
| 12 | + |
| 13 | +## Supported Hardware |
| 14 | + - ESP8266 [Arduino for ESP8266](https://github.com/esp8266/Arduino/) |
| 15 | + - ESP32 [Arduino for ESP32](https://github.com/espressif/arduino-esp32) |
| 16 | + - ESP31B |
| 17 | + - Particle with STM32 ARM Cortex M3 |
| 18 | + - ATmega328 with Ethernet Shield (ATmega branch) |
| 19 | + - ATmega328 with enc28j60 (ATmega branch) |
| 20 | + - ATmega2560 with Ethernet Shield (ATmega branch) |
| 21 | + - ATmega2560 with enc28j60 (ATmega branch) |
| 22 | + - |
| 23 | +## Methods |
| 24 | +#### connect(socket_token) |
| 25 | +Method to connect to Streamlabs server, required [socket token](https://streamlabs.readme.io/docs/sockettoken). |
| 26 | + |
| 27 | +#### followTwitchEvent(callback) |
| 28 | +#### subscriptionsTwitchEvent(callback) |
| 29 | +#### hostTwitchEvent(callback) |
| 30 | +#### bitsTwitchEvent(callback) |
| 31 | +#### raidsTwitchEvent(callback) |
| 32 | +#### donationEvent(callback) |
| 33 | +#### loop() |
| 34 | + |
| 35 | +## Example |
| 36 | +##### Connection |
| 37 | +```c++ |
| 38 | +char* socketToken = "token"; |
| 39 | +StreamlabsAPI streamlabsAPI.connect(socketToken); |
| 40 | +``` |
| 41 | +##### Event Callback |
| 42 | +```c++ |
| 43 | +void followerEvent(const char* payload) { |
| 44 | + Serial.print("got followerEvent message: "); |
| 45 | + Serial.println(payload); |
| 46 | +} |
| 47 | +streamlabsAPI.followTwitchEvent(followerEvent); |
| 48 | +``` |
| 49 | +
|
| 50 | +##### Loop Method |
| 51 | +loop method is **required** to make this library work. |
| 52 | +```c++ |
| 53 | +void loop() { |
| 54 | + streamlabsAPI.loop(); |
| 55 | +} |
| 56 | +``` |
| 57 | + |
| 58 | + |
| 59 | +Event result documentation can be found on Streamlabs WebSite [HERE](https://dev.streamlabs.com/docs/socket-api) |
| 60 | + |
| 61 | +### Issues ### |
| 62 | +Submit issues to: https://github.com/lucalas/StreamlabsArduinoAlerts/issues |
0 commit comments