* Update twitch API * Update twitchAPI * Add tests * Apply suggestions from code review Co-authored-by: Franck Nijhof <frenck@frenck.nl> * Update sensor.py * Update sensor.py * Update sensor.py * Update sensor.py * Update sensor.py * Fix coverage * Move Twitch constants to separate file * Move Twitch constants to separate file * Move Twitch constants to separate file * Add application credentials * Add config flow * Try to add tests * Add strings * Add tests * Add tests * Improve tests * Fix tests * Extract Twitch client creation * Fix reauth * Remove import flow * Remove import flow * Remove reauth * Update * Fix Ruff * Fix feedback * Add strings * Add reauth * Do stuff in init * Fix stuff * Fix stuff * Fix stuff * Fix stuff * Fix stuff * Start with tests * Test coverage * Test coverage * Remove strings * Cleanup * Fix feedback * Fix feedback --------- Co-authored-by: Franck Nijhof <frenck@frenck.nl>
20 lines
469 B
Python
20 lines
469 B
Python
"""Const for Twitch."""
|
|
import logging
|
|
|
|
from twitchAPI.twitch import AuthScope
|
|
|
|
from homeassistant.const import Platform
|
|
|
|
LOGGER = logging.getLogger(__package__)
|
|
|
|
PLATFORMS = [Platform.SENSOR]
|
|
|
|
OAUTH2_AUTHORIZE = "https://id.twitch.tv/oauth2/authorize"
|
|
OAUTH2_TOKEN = "https://id.twitch.tv/oauth2/token"
|
|
|
|
CONF_REFRESH_TOKEN = "refresh_token"
|
|
|
|
DOMAIN = "twitch"
|
|
CONF_CHANNELS = "channels"
|
|
|
|
OAUTH_SCOPES = [AuthScope.USER_READ_SUBSCRIPTIONS, AuthScope.USER_READ_FOLLOWS]
|