mirror of
https://github.com/onyx-and-iris/streamlabs-socketio-py
synced 2024-11-21 15:00:48 +00:00
base error class added
readme updated patch bump
This commit is contained in:
parent
6e13e71a09
commit
822bdfb60d
@ -88,6 +88,7 @@ def on_twitch_event(event, data):
|
|||||||
|
|
||||||
### Errors
|
### Errors
|
||||||
|
|
||||||
|
- `SteamlabsSIOError`: Base StreamlabsSIO error class
|
||||||
- `SteamlabsSIOConnectionError`: Exception raised when connection errors occur
|
- `SteamlabsSIOConnectionError`: Exception raised when connection errors occur
|
||||||
|
|
||||||
### Logging
|
### Logging
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "streamlabsio"
|
name = "streamlabsio"
|
||||||
version = "1.1.0"
|
version = "1.1.1"
|
||||||
description = "Get real time Twitch/Youtube events through Streamlabs SocketIO API"
|
description = "Get real time Twitch/Youtube events through Streamlabs SocketIO API"
|
||||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -46,12 +46,12 @@ class Client:
|
|||||||
self.log_mode()
|
self.log_mode()
|
||||||
|
|
||||||
def log_mode(self):
|
def log_mode(self):
|
||||||
INFO_MSG = (f"Running client in {'raw' if self.raw else 'normal'} mode.",)
|
info = (f"Running client in {'raw' if self.raw else 'normal'} mode.",)
|
||||||
if self.raw:
|
if self.raw:
|
||||||
INFO_MSG += ("raw JSON messages will be passed to callbacks",)
|
info += ("raw JSON messages will be passed to callbacks",)
|
||||||
else:
|
else:
|
||||||
INFO_MSG += ("event data objects will be passed to callbacks",)
|
info += ("event data objects will be passed to callbacks",)
|
||||||
self.logger.info(" ".join(INFO_MSG))
|
self.logger.info(" ".join(info))
|
||||||
|
|
||||||
def _token_from_toml(self) -> str:
|
def _token_from_toml(self) -> str:
|
||||||
try:
|
try:
|
||||||
|
@ -1,2 +1,6 @@
|
|||||||
class SteamlabsSIOConnectionError(Exception):
|
class SteamlabsSIOError(Exception):
|
||||||
|
"""Base StreamlabsSIO error class"""
|
||||||
|
|
||||||
|
|
||||||
|
class SteamlabsSIOConnectionError(SteamlabsSIOError):
|
||||||
"""Exception raised when connection errors occur"""
|
"""Exception raised when connection errors occur"""
|
||||||
|
Loading…
Reference in New Issue
Block a user