mirror of
https://github.com/home-assistant/core.git
synced 2026-05-29 19:57:40 +01:00
d766aae436
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
27 lines
816 B
Python
27 lines
816 B
Python
"""Constants for the Geocaching integration."""
|
|
|
|
from datetime import timedelta
|
|
import logging
|
|
from typing import Final
|
|
|
|
from geocachingapi.models import GeocachingApiEnvironment
|
|
|
|
from .models import GeocachingOAuthApiUrls
|
|
|
|
DOMAIN: Final = "geocaching"
|
|
LOGGER = logging.getLogger(__package__)
|
|
UPDATE_INTERVAL = timedelta(hours=1)
|
|
|
|
ENVIRONMENT_URLS = {
|
|
GeocachingApiEnvironment.Staging: GeocachingOAuthApiUrls(
|
|
authorize_url="https://staging.geocaching.com/oauth/authorize.aspx",
|
|
token_url="https://oauth-staging.geocaching.com/token",
|
|
),
|
|
GeocachingApiEnvironment.Production: GeocachingOAuthApiUrls(
|
|
authorize_url="https://www.geocaching.com/oauth/authorize.aspx",
|
|
token_url="https://oauth.geocaching.com/token",
|
|
),
|
|
}
|
|
|
|
ENVIRONMENT = GeocachingApiEnvironment.Production
|