mss-python 0.1.6__py3-none-any.whl → 0.1.8__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.
mss_python/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.1.6'
16
- __version_tuple__ = version_tuple = (0, 1, 6)
15
+ __version__ = version = '0.1.8'
16
+ __version_tuple__ = version_tuple = (0, 1, 8)
mss_python/client.py CHANGED
@@ -58,7 +58,7 @@ class Client:
58
58
 
59
59
  root = method.get_base_xml(self.cred, self.lang)
60
60
 
61
- if data is None:
61
+ if data is not None:
62
62
  root = change_structure(root, data)
63
63
 
64
64
  if _print is True:
@@ -92,13 +92,13 @@ def refine_getHotelList(resp: dict) -> dict:
92
92
  return resp
93
93
  elif "hotel" not in resp["result"] or resp["result"]["hotel"] is None:
94
94
  return resp
95
- elif resp["result"]["hotel"] is list:
95
+ elif resp["result"]["hotel"] is not list:
96
96
  resp["result"]["hotel"] = [resp["result"]["hotel"]]
97
97
 
98
98
  for hotel in resp["result"]["hotel"]:
99
99
  ensure_list_value(hotel, "pictures", "picture")
100
100
  ensure_list_value(hotel, "gallery", "picture")
101
- ensure_list_value(hotel, "feature_view", "feature")
101
+ ensure_list_value(hotel, "features_view", "feature")
102
102
  ensure_list_value(hotel, "pos", "id_pos")
103
103
 
104
104
  return resp
@@ -107,5 +107,5 @@ def refine_getHotelList(resp: dict) -> dict:
107
107
  def ensure_list_value(hotel: dict, parent_fld: str, child_fld: str) -> None:
108
108
  if parent_fld not in hotel:
109
109
  hotel[parent_fld] = {child_fld: []}
110
- elif hotel[parent_fld][child_fld] is list:
110
+ elif hotel[parent_fld][child_fld] is not list:
111
111
  hotel[parent_fld][child_fld] = [hotel[parent_fld][child_fld]]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mss-python
3
- Version: 0.1.6
3
+ Version: 0.1.8
4
4
  Summary: MSS API wrapper for Python projects
5
5
  Author: Rubin Canaj
6
6
  Author-email: HGV <development@hgv.it>
@@ -30,6 +30,7 @@ Project-URL: Repository, https://github.com/bookingsuedtirol/mss-python
30
30
  Requires-Python: <4,>=3.7
31
31
  Description-Content-Type: text/markdown
32
32
  License-File: LICENSE
33
+ Requires-Dist: xmltodict ==0.13.0
33
34
 
34
35
  # mss-python ![PyPI](https://img.shields.io/pypi/v/mss-python)
35
36
 
@@ -0,0 +1,11 @@
1
+ mss_python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ mss_python/_version.py,sha256=PdJ7dZoz_SyEgX0MdrMfQYBFlGcwpemv6ibF8NKALBY,411
3
+ mss_python/client.py,sha256=Xc2F2UlQeHJBF329pl2lCjbCaww85wm0aeO5xIWm09s,3215
4
+ mss_python/request/method_names.py,sha256=DP22Tra-F86FP-6771q7bDwuX6ojPCidFPzztl4UThI,1030
5
+ mss_python/request/methods.py,sha256=pu_U6z8ANktuv0r3P6MmLKW66fwRhiDCp261vNxqrYE,664
6
+ mss_python/request/types_mss.py,sha256=Xq9YYA5-f_j2Gt7bCcHSC6qEzHs0hswpoXm2IGB9SdA,22354
7
+ mss_python-0.1.8.dist-info/LICENSE,sha256=SxLvAIuAvi2G5v6pRCopG3gAH9SLL_-xACJ0QBz_Blw,1074
8
+ mss_python-0.1.8.dist-info/METADATA,sha256=QN-1OX2dUMHo0kOHwSlbVpsbc5jiA4IWA4223mF5MQo,3044
9
+ mss_python-0.1.8.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
10
+ mss_python-0.1.8.dist-info/top_level.txt,sha256=-5Wm4NpowVgq9ImH61vhAiBQFoE21fg4r-7Pn7mOYyE,11
11
+ mss_python-0.1.8.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- mss_python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- mss_python/_version.py,sha256=L9DFp_i-1xztMRdin6ZHqLFMlDKUn5bsVgheqXFwTTc,411
3
- mss_python/client.py,sha256=DEMAGATE08MW42Ldtepk95RV6funmyyuFbN9XFhiwPk,3202
4
- mss_python/request/method_names.py,sha256=DP22Tra-F86FP-6771q7bDwuX6ojPCidFPzztl4UThI,1030
5
- mss_python/request/methods.py,sha256=pu_U6z8ANktuv0r3P6MmLKW66fwRhiDCp261vNxqrYE,664
6
- mss_python/request/types_mss.py,sha256=Xq9YYA5-f_j2Gt7bCcHSC6qEzHs0hswpoXm2IGB9SdA,22354
7
- mss_python-0.1.6.dist-info/LICENSE,sha256=SxLvAIuAvi2G5v6pRCopG3gAH9SLL_-xACJ0QBz_Blw,1074
8
- mss_python-0.1.6.dist-info/METADATA,sha256=TzDicAzWZKGKD7plNpA3i2QeCSNoav9R9Y5VJwcsB0o,3010
9
- mss_python-0.1.6.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
10
- mss_python-0.1.6.dist-info/top_level.txt,sha256=-5Wm4NpowVgq9ImH61vhAiBQFoE21fg4r-7Pn7mOYyE,11
11
- mss_python-0.1.6.dist-info/RECORD,,