lghorizon 0.8.7__py3-none-any.whl → 0.9.0b0__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,41 +1,6 @@
1
1
  """Python client for LG Horizon."""
2
2
 
3
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
4
+ from .lghorizon_device import LGHorizonDevice
5
+ from .lghorizon_models import *
6
+ from .exceptions import *
lghorizon/const.py CHANGED
@@ -38,11 +38,18 @@ 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
+
41
48
  COUNTRY_SETTINGS = {
42
49
  "nl": {
43
50
  "api_url": "https://spark-prod-nl.gnp.cloud.ziggogo.tv",
44
51
  "mqtt_url": "obomsg.prod.nl.horizon.tv",
45
- "use_oauth": False,
52
+ "use_refreshtoken": False,
46
53
  "channels": [
47
54
  {
48
55
  "channelId": "NL_000073_019506",
@@ -106,7 +113,7 @@ COUNTRY_SETTINGS = {
106
113
  },
107
114
  "be-nl-preprod": {
108
115
  "api_url": "https://spark-preprod-be.gnp.cloud.telenet.tv",
109
- "use_oauth": True,
116
+ "use_refreshtoken": True,
110
117
  "oauth_username_fieldname": "j_username",
111
118
  "oauth_password_fieldname": "j_password",
112
119
  "oauth_add_accept_header": False,
@@ -131,13 +138,13 @@ COUNTRY_SETTINGS = {
131
138
  },
132
139
  "ie": {
133
140
  "api_url": "https://spark-prod-ie.gnp.cloud.virginmediatv.ie",
134
- "use_oauth": False,
141
+ "use_refreshtoken": False,
135
142
  "channels": [],
136
143
  "language": "en",
137
144
  },
138
145
  "pl": {
139
146
  "api_url": "https://spark-prod-pl.gnp.cloud.upctv.pl",
140
- "use_oauth": False,
147
+ "use_refreshtoken": False,
141
148
  "channels": [],
142
149
  "language": "pl",
143
150
  "platform_types": {
lghorizon/helpers.py CHANGED
@@ -3,7 +3,7 @@
3
3
  import random
4
4
 
5
5
 
6
- def make_id(string_length=10):
6
+ async 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))