Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bendikrb committed Sep 4, 2024
1 parent 671eb39 commit 9d088a3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
3 changes: 2 additions & 1 deletion podplay_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
LOGGER as _LOGGER,
PODPLAY_API_URL,
PODPLAY_USER_AGENT,
TIMEOUT,
)
from podplay_api.exceptions import (
PodPlayApiConnectionError,
Expand All @@ -43,7 +44,7 @@ class PodPlayClient:

language: PodPlayLanguage = PodPlayLanguage.EN

request_timeout: int = 8
request_timeout: int = TIMEOUT
session: ClientSession | None = None

_close_session: bool = False
Expand Down
23 changes: 1 addition & 22 deletions podplay_api/const.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
"""podplay_api constants."""
import logging

PODPLAY_USER_AGENT = "podplay_api python/3.8.5 aiohttp/3.8.3"

PODPLAY_USER_AGENT = "podplay_api/0.0.0"
PODPLAY_API_URL = "https://api.podplay.com/v1"
PODPLAY_AUTH_CLIENT_ID = "6e1a23e7-71ec-4483-918a-25c33852c9c9"
PODPLAY_AUTH_TENANT = "reacthello"
PODPLAY_AUTH_LOGIN_USER_FLOW = "B2C_1_web_combined_login"
PODPLAY_AUTH_URL = f"https://{PODPLAY_AUTH_TENANT}.b2clogin.com"
PODPLAY_AUTH_TOKEN_URL = "https://{tenant}.b2clogin.com/{tenant}.onmicrosoft.com/{login_user_flow}".format(
tenant=PODPLAY_AUTH_TENANT,
login_user_flow=PODPLAY_AUTH_LOGIN_USER_FLOW,
)
PODPLAY_AUTH_REDIRECT_URI = "https://podplay.com/static/redirect.html"

PODPLAY_SCHIBSTED_AUTH_DOMAIN = "https://payment.schibsted.no"
PODPLAY_SCHIBSTED_AUTH_URL_BASE = f"{PODPLAY_SCHIBSTED_AUTH_DOMAIN}/oauth/authorize"
PODPLAY_SCHIBSTED_AUTH_CLIENT_ID = "626bcf5e1332f10a4997c29a"
PODPLAY_SCHIBSTED_AUTH_REDIRECT = "https://podplay.com/auth/handleSchibstedLogin"
PODPLAY_SCHIBSTED_AUTH_RETURN_URL = "https://podplay.com/no/oppdag"
PODPLAY_SCHIBSTED_AUTH_SCOPE = "openid email"
PODPLAY_SCHIBSTED_AUTH_RESPONSE_TYPE = "code"
PODPLAY_SCHIBSTED_AUTH_CSRF_URL = f"{PODPLAY_SCHIBSTED_AUTH_DOMAIN}/authn/api/settings/csrf"
PODPLAY_SCHIBSTED_AUTH_LOGIN_URL = f"{PODPLAY_SCHIBSTED_AUTH_DOMAIN}/authn/api/identity/login/"
PODPLAY_SCHIBSTED_AUTH_FINISH_URL = f"{PODPLAY_SCHIBSTED_AUTH_DOMAIN}/authn/identity/finish/"

TIMEOUT = 10

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "podplay-api"
version = "0.0.1"
version = "0.0.0"
description = "A client library for using the podplay.com web API"
readme = "README.md"
authors = ["Bendik R. Brenne <bendik@konstant.no>"]
Expand Down

0 comments on commit 9d088a3

Please sign in to comment.