lghorizon 0.9.0.dev2__py3-none-any.whl → 0.9.0.dev4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lghorizon/__init__.py CHANGED
@@ -1,3 +1,41 @@
1
1
  """Python client for LG Horizon."""
2
2
 
3
- pass
3
+ from .lghorizon_api import LGHorizonApi
4
+ from .models import (
5
+ LGHorizonBox,
6
+ LGHorizonRecordingListSeasonShow,
7
+ LGHorizonRecordingSingle,
8
+ LGHorizonRecordingShow,
9
+ LGHorizonRecordingEpisode,
10
+ LGHorizonCustomer,
11
+ )
12
+ from .exceptions import (
13
+ LGHorizonApiUnauthorizedError,
14
+ LGHorizonApiConnectionError,
15
+ LGHorizonApiLockedError,
16
+ )
17
+ from .const import (
18
+ ONLINE_RUNNING,
19
+ ONLINE_STANDBY,
20
+ RECORDING_TYPE_SHOW,
21
+ RECORDING_TYPE_SEASON,
22
+ RECORDING_TYPE_SINGLE,
23
+ )
24
+
25
+ __all__ = [
26
+ "LGHorizonApi",
27
+ "LGHorizonBox",
28
+ "LGHorizonRecordingListSeasonShow",
29
+ "LGHorizonRecordingSingle",
30
+ "LGHorizonRecordingShow",
31
+ "LGHorizonRecordingEpisode",
32
+ "LGHorizonCustomer",
33
+ "LGHorizonApiUnauthorizedError",
34
+ "LGHorizonApiConnectionError",
35
+ "LGHorizonApiLockedError",
36
+ "ONLINE_RUNNING",
37
+ "ONLINE_STANDBY",
38
+ "RECORDING_TYPE_SHOW",
39
+ "RECORDING_TYPE_SEASON",
40
+ "RECORDING_TYPE_SINGLE",
41
+ ] # noqa
lghorizon/const.py CHANGED
@@ -38,18 +38,11 @@ RECORDING_TYPE_SEASON = "season"
38
38
 
39
39
  BE_AUTH_URL = "https://login.prd.telenet.be/openid/login.do"
40
40
 
41
- PLATFORM_TYPES = {
42
- "EOS": {"manufacturer": "Arris", "model": "DCX960"},
43
- "EOS2": {"manufacturer": "HUMAX", "model": "2008C-STB-TN"},
44
- "HORIZON": {"manufacturer": "Arris", "model": "DCX960"},
45
- "APOLLO": {"manufacturer": "Arris", "model": "VIP5002W"},
46
- }
47
-
48
41
  COUNTRY_SETTINGS = {
49
42
  "nl": {
50
43
  "api_url": "https://spark-prod-nl.gnp.cloud.ziggogo.tv",
51
44
  "mqtt_url": "obomsg.prod.nl.horizon.tv",
52
- "use_refreshtoken": False,
45
+ "use_oauth": False,
53
46
  "channels": [
54
47
  {
55
48
  "channelId": "NL_000073_019506",
@@ -113,7 +106,7 @@ COUNTRY_SETTINGS = {
113
106
  },
114
107
  "be-nl-preprod": {
115
108
  "api_url": "https://spark-preprod-be.gnp.cloud.telenet.tv",
116
- "use_refreshtoken": True,
109
+ "use_oauth": True,
117
110
  "oauth_username_fieldname": "j_username",
118
111
  "oauth_password_fieldname": "j_password",
119
112
  "oauth_add_accept_header": False,
@@ -138,13 +131,13 @@ COUNTRY_SETTINGS = {
138
131
  },
139
132
  "ie": {
140
133
  "api_url": "https://spark-prod-ie.gnp.cloud.virginmediatv.ie",
141
- "use_refreshtoken": False,
134
+ "use_oauth": False,
142
135
  "channels": [],
143
136
  "language": "en",
144
137
  },
145
138
  "pl": {
146
139
  "api_url": "https://spark-prod-pl.gnp.cloud.upctv.pl",
147
- "use_refreshtoken": False,
140
+ "use_oauth": False,
148
141
  "channels": [],
149
142
  "language": "pl",
150
143
  "platform_types": {
lghorizon/helpers.py CHANGED
@@ -3,7 +3,7 @@
3
3
  import random
4
4
 
5
5
 
6
- async def make_id(string_length=10):
6
+ def make_id(string_length=10):
7
7
  """Create an id with given length."""
8
8
  letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
9
9
  return "".join(random.choice(letters) for i in range(string_length))