MouseTools 3.1.0.dev1__py3-none-any.whl → 3.1.0.dev2__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.
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MouseTools
3
- Version: 3.1.0.dev1
3
+ Version: 3.1.0.dev2
4
4
  Summary: An unofficial Python wrapper for Disney's API
5
5
  Author: Scott Caratozzolo
6
6
  Project-URL: repository, https://gitlab.com/caratozzoloxyz/public/MouseTools
7
+ Project-URL: documentation, https://caratozzoloxyz.gitlab.io/public/MouseTools/
7
8
  Classifier: Programming Language :: Python :: 3
8
9
  Classifier: License :: OSI Approved :: MIT License
9
10
  Classifier: Operating System :: OS Independent
@@ -1,11 +1,11 @@
1
- mousetools/__init__.py,sha256=_2d-7eIVKOj36JQQygsloKaR6h4TBn17Ujt1gMV0ivM,199
1
+ mousetools/__init__.py,sha256=8TH8dO7pAgFB4pSi1mfpEtIEAtOoLj0thRwkh-BWc7U,199
2
2
  mousetools/auth.py,sha256=ogbssFgG4Fmjuce2ppH96nlh3BJNXjOTWuSVbVM4XGQ,2372
3
3
  mousetools/exceptions.py,sha256=0omdWcFu99r1XgVWQpn2jemgR34-lkfOeXvWFyCFILM,536
4
4
  mousetools/ids.py,sha256=Gsnb9tkQ7uyDacbGJHGdYVv-4-FyfEI3BplMrYW67PY,4248
5
5
  mousetools/urls.py,sha256=2WQMnUo080QxwFXOs5t9X5893QofQ5z3by_vkQsCDpo,233
6
- mousetools/entities/__init__.py,sha256=hn2vBG7h9sxvRVhEptgh6aZ-Pzg8O9gkt2vMRiwQ8N8,1493
6
+ mousetools/entities/__init__.py,sha256=HuNje5r9AuMPbP1h3S06XBPzoanhub8tWcApNyE4mIc,1493
7
7
  mousetools/entities/attraction.py,sha256=ACKNG_5xMM2kXws_76SmcfqaqErxRRzEER2XGsMtUpA,366
8
- mousetools/entities/base.py,sha256=aHR7aLO5nfjO4JlzoCWo7EinsARYhiDNTKjC6PjtRQg,16554
8
+ mousetools/entities/base.py,sha256=Eeye28DhNk1_YXf-VPtwI2U0uum-wPfVW1Q57CRofg0,16579
9
9
  mousetools/entities/character.py,sha256=ifdzEZC9r3W_ZBoYzjgsKMWbT3TmmDo98wg7letqaoU,363
10
10
  mousetools/entities/destination.py,sha256=MsQ713DRoWlBoEHSKqtt4qctArHXUqk1ukYU_tnNh5o,520
11
11
  mousetools/entities/dining_event.py,sha256=9aa7MF5FPQdLcwHDgm77KT6kmba3IVBx_KyhEPXu9XU,370
@@ -15,18 +15,18 @@ mousetools/entities/entertainment_venue.py,sha256=53WzFLnjoKZYaz3GV-B9km2UNiMYKX
15
15
  mousetools/entities/event.py,sha256=_u_IYJM55FwPpf_RVlqYK2ryaWq-5gznhBqRlSwnepg,351
16
16
  mousetools/entities/guest_services.py,sha256=p1NP1vnkEXOv1OMKRiWPhQ77Cikok3jXAOu3PJQXV_o,376
17
17
  mousetools/entities/land.py,sha256=oT8wSBuLyBe34kRhl2O-DJyA1np1O-X-YsJoRnqVhFI,348
18
- mousetools/entities/menu.py,sha256=FvNfuk4DDWZBlcY7xwXm03TlTsCaq3LHMZplUxCOQYw,6145
18
+ mousetools/entities/menu.py,sha256=ymXEBbxIlbThII_oxvgk9cXWt2_JSARWrk0uR4-xaw0,6167
19
19
  mousetools/entities/merchandise_facility.py,sha256=xtU_yuhGi4seS7e2ClMtsaqmw-SBIs5N_7gFz1FxgcA,395
20
20
  mousetools/entities/park.py,sha256=ZtXo4hyyJFIRQ7l-GMmBj9rMH14KUQ84f5RVZ0VLBcI,1221
21
21
  mousetools/entities/point_of_interest.py,sha256=h-CroI3QwuLGvGmGHRS3yQO8OQB-5lplLmQHlvLHDNo,385
22
22
  mousetools/entities/resort.py,sha256=aKNrLVa_KRTHPLbY2IHMp7sgSesBT2gR0u6XJBaEt14,354
23
23
  mousetools/entities/resort_area.py,sha256=COiwcB8aXOFWmjw_RYOYgJ35SHb8z_QaBKyTHA2OGZQ,368
24
- mousetools/entities/restaurant.py,sha256=j0Lk_F01A4jOTkUSyHm98gccbn1d52VK70KctU0ErpU,1654
24
+ mousetools/entities/restaurant.py,sha256=9Ci3N2QohPeuPUwBS19rsFsXMjFC89IgSU8pYjJTKlo,1655
25
25
  mousetools/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- mousetools/mixins/disney.py,sha256=9EW_TPl3LQy9EHyivxVSOKJ1TWjfPHHdwnDQJK4c-b0,1854
26
+ mousetools/mixins/disney.py,sha256=1l2ck-1cIZph_fnIApqGRqLGKgVpTn91wnZ5abmxmfs,1862
27
27
  mousetools/mixins/themeparksapi.py,sha256=gxep2vBXMSSVh1c3Yjt7oaIyCjhQfGtbSHXysbhazbs,4321
28
- MouseTools-3.1.0.dev1.dist-info/LICENSE,sha256=xX4HoDU-zdafl3yEfIaspkvqHPaaXhuDwkJ6qhDMUIo,1074
29
- MouseTools-3.1.0.dev1.dist-info/METADATA,sha256=NKozUIYipaOkFtM9MT0sQF0b4yjUqWpQlwKi9QSeCac,2496
30
- MouseTools-3.1.0.dev1.dist-info/WHEEL,sha256=ixB2d4u7mugx_bCBycvM9OzZ5yD7NmPXFRtKlORZS2Y,91
31
- MouseTools-3.1.0.dev1.dist-info/top_level.txt,sha256=7nanLN103J_xJn6HK6yuyqqlDgltCsQY2-ArRXx1Ukk,11
32
- MouseTools-3.1.0.dev1.dist-info/RECORD,,
28
+ MouseTools-3.1.0.dev2.dist-info/LICENSE,sha256=xX4HoDU-zdafl3yEfIaspkvqHPaaXhuDwkJ6qhDMUIo,1074
29
+ MouseTools-3.1.0.dev2.dist-info/METADATA,sha256=JHql1m7EDD0kAOK5-mZ2b3Tr4q49dlYrHV1a-CIFJt4,2576
30
+ MouseTools-3.1.0.dev2.dist-info/WHEEL,sha256=uCRv0ZEik_232NlR4YDw4Pv3Ajt5bKvMH13NUU7hFuI,91
31
+ MouseTools-3.1.0.dev2.dist-info/top_level.txt,sha256=7nanLN103J_xJn6HK6yuyqqlDgltCsQY2-ArRXx1Ukk,11
32
+ MouseTools-3.1.0.dev2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (74.1.0)
2
+ Generator: setuptools (74.1.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
mousetools/__init__.py CHANGED
@@ -3,5 +3,5 @@ import logging
3
3
  logger = logging.getLogger(__name__)
4
4
  logger.addHandler(logging.NullHandler())
5
5
 
6
- __version__ = "3.1.0-dev.1" # will be set at runtime
6
+ __version__ = "3.1.0-dev.2" # will be set at runtime
7
7
  logger.info(f"MouseTools version: {__version__}")
@@ -8,13 +8,13 @@ from mousetools.entities.entertainment_venue import EntertainmentVenue
8
8
  from mousetools.entities.event import Event
9
9
  from mousetools.entities.guest_services import GuestServices
10
10
  from mousetools.entities.land import Land
11
+ from mousetools.entities.menu import Menus
11
12
  from mousetools.entities.merchandise_facility import MerchandiseFacility
12
13
  from mousetools.entities.park import ThemePark, WaterPark
13
14
  from mousetools.entities.point_of_interest import PointOfInterest
14
15
  from mousetools.entities.resort import Resort
15
16
  from mousetools.entities.resort_area import ResortArea
16
17
  from mousetools.entities.restaurant import Restaurant
17
- from mousetools.entities.menu import Menus
18
18
  from mousetools.ids import DestinationIds
19
19
 
20
20
  WALT_DISNEY_WORLD_DESTINATION = Destination(DestinationIds.WALT_DISNEY_WORLD)
@@ -106,16 +106,17 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
106
106
  return {
107
107
  "lat": float(
108
108
  self.disney_data["coordinates"]["Guest Entrance"]["gps"][
109
- "lattitude"
109
+ "latitude"
110
110
  ]
111
111
  ),
112
112
  "lng": float(
113
- self.disney_data["coordinates"]["Guest entrance"]["gps"][
113
+ self.disney_data["coordinates"]["Guest Entrance"]["gps"][
114
114
  "longitude"
115
115
  ]
116
116
  ),
117
117
  }
118
- except KeyError:
118
+ except KeyError as e:
119
+ print(e)
119
120
  logger.debug("No coordinates found for %s", self.entity_id)
120
121
  return None
121
122
 
@@ -1,4 +1,5 @@
1
1
  import typing
2
+
2
3
  from mousetools.entities.base import EntityBase
3
4
  from mousetools.ids import FacilityServiceEntityTypes
4
5
 
@@ -74,6 +75,8 @@ class MenuItem:
74
75
  except KeyError:
75
76
  return None
76
77
 
78
+ return None
79
+
77
80
 
78
81
  class Menu:
79
82
  def __init__(self, raw_menu_data: dict):
@@ -1,7 +1,8 @@
1
+ import logging
1
2
  import typing
3
+
2
4
  from mousetools.entities.base import EntityBase
3
5
  from mousetools.ids import FacilityServiceEntityTypes
4
- import logging
5
6
 
6
7
  logger = logging.getLogger(__name__)
7
8
 
@@ -30,8 +30,6 @@ class DisneyAPIMixin:
30
30
  logger.info("Sending request to %s", url)
31
31
  response = httpx.get(url, headers=auth_obj.get_headers())
32
32
  logger.debug("Response status: %s", response.status_code)
33
- if response.status_code == httpx._status_codes.codes.NOT_FOUND:
34
- raise EntityIDNotFoundError
35
33
 
36
34
  try:
37
35
  response.raise_for_status()
@@ -49,6 +47,8 @@ class DisneyAPIMixin:
49
47
  logger.debug("Sending new request to %s", url)
50
48
  response = httpx.get(url, headers=auth_obj.get_headers())
51
49
  logger.debug("Response status: %s", response.status_code)
50
+ if response.status_code == httpx._status_codes.codes.NOT_FOUND:
51
+ raise EntityIDNotFoundError
52
52
  response.raise_for_status()
53
53
  data = response.json()
54
54