Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the Geocaching integration."""
2 
3 from __future__ import annotations
4 
5 from datetime import timedelta
6 import logging
7 from typing import Final
8 
9 from geocachingapi.models import GeocachingApiEnvironment
10 
11 from .models import GeocachingOAuthApiUrls
12 
13 DOMAIN: Final = "geocaching"
14 LOGGER = logging.getLogger(__package__)
15 UPDATE_INTERVAL = timedelta(hours=1)
16 
17 ENVIRONMENT_URLS = {
18  GeocachingApiEnvironment.Staging: GeocachingOAuthApiUrls(
19  authorize_url="https://staging.geocaching.com/oauth/authorize.aspx",
20  token_url="https://oauth-staging.geocaching.com/token",
21  ),
22  GeocachingApiEnvironment.Production: GeocachingOAuthApiUrls(
23  authorize_url="https://www.geocaching.com/oauth/authorize.aspx",
24  token_url="https://oauth.geocaching.com/token",
25  ),
26 }
27 
28 ENVIRONMENT = GeocachingApiEnvironment.Production