1
mirror of https://github.com/home-assistant/core synced 2024-08-28 03:36:46 +02:00
ha-core/homeassistant/components/twitch/const.py
Joost Lekkerkerker 25a80cd46f
Add config flow to Twitch (#93451)
* 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>
2023-09-27 15:45:52 +02:00

21 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]