MouseTools 3.0.0.dev2__py3-none-any.whl → 3.1.0.dev1__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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MouseTools
3
- Version: 3.0.0.dev2
3
+ Version: 3.1.0.dev1
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
@@ -1,11 +1,11 @@
1
- mousetools/__init__.py,sha256=QDVy9HOqGcQaEeRFhBKiKEx_BdM0er3pydqlvoSMztw,199
1
+ mousetools/__init__.py,sha256=_2d-7eIVKOj36JQQygsloKaR6h4TBn17Ujt1gMV0ivM,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=6UCrjuEJ_DboUhQHYrn16GL2VdCPw13or4fuU85Q4hM,1437
6
+ mousetools/entities/__init__.py,sha256=hn2vBG7h9sxvRVhEptgh6aZ-Pzg8O9gkt2vMRiwQ8N8,1493
7
7
  mousetools/entities/attraction.py,sha256=ACKNG_5xMM2kXws_76SmcfqaqErxRRzEER2XGsMtUpA,366
8
- mousetools/entities/base.py,sha256=G7i8WQhRoWAp7eDx3_c9I_A9rejnC9TwKchRAtL00_c,16570
8
+ mousetools/entities/base.py,sha256=aHR7aLO5nfjO4JlzoCWo7EinsARYhiDNTKjC6PjtRQg,16554
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=sZPanyB7zuznRC-B4wIJbKWRyM_gwVAAVnLKsBjG5-A,353
18
+ mousetools/entities/menu.py,sha256=FvNfuk4DDWZBlcY7xwXm03TlTsCaq3LHMZplUxCOQYw,6145
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=QTWPhmQb0kqRUNdLwqCpc3LGpQ35DvXdWFXQXgtgCBo,366
24
+ mousetools/entities/restaurant.py,sha256=j0Lk_F01A4jOTkUSyHm98gccbn1d52VK70KctU0ErpU,1654
25
25
  mousetools/mixins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  mousetools/mixins/disney.py,sha256=9EW_TPl3LQy9EHyivxVSOKJ1TWjfPHHdwnDQJK4c-b0,1854
27
27
  mousetools/mixins/themeparksapi.py,sha256=gxep2vBXMSSVh1c3Yjt7oaIyCjhQfGtbSHXysbhazbs,4321
28
- MouseTools-3.0.0.dev2.dist-info/LICENSE,sha256=xX4HoDU-zdafl3yEfIaspkvqHPaaXhuDwkJ6qhDMUIo,1074
29
- MouseTools-3.0.0.dev2.dist-info/METADATA,sha256=RyuiZTeMGFhu4LPRIpTDIhoah-Ax90JBjQK7JhA1cgI,2496
30
- MouseTools-3.0.0.dev2.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
31
- MouseTools-3.0.0.dev2.dist-info/top_level.txt,sha256=7nanLN103J_xJn6HK6yuyqqlDgltCsQY2-ArRXx1Ukk,11
32
- MouseTools-3.0.0.dev2.dist-info/RECORD,,
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,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (74.0.0)
2
+ Generator: setuptools (74.1.0)
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.0.0-dev.2" # will be set at runtime
6
+ __version__ = "3.1.0-dev.1" # will be set at runtime
7
7
  logger.info(f"MouseTools version: {__version__}")
@@ -14,6 +14,7 @@ from mousetools.entities.point_of_interest import PointOfInterest
14
14
  from mousetools.entities.resort import Resort
15
15
  from mousetools.entities.resort_area import ResortArea
16
16
  from mousetools.entities.restaurant import Restaurant
17
+ from mousetools.entities.menu import Menus
17
18
  from mousetools.ids import DestinationIds
18
19
 
19
20
  WALT_DISNEY_WORLD_DESTINATION = Destination(DestinationIds.WALT_DISNEY_WORLD)
@@ -38,4 +39,5 @@ __all__ = [
38
39
  "Event",
39
40
  "Land",
40
41
  "PointOfInterest",
42
+ "Menus",
41
43
  ]
@@ -23,7 +23,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
23
23
 
24
24
  if isinstance(facility_service_entity_type, FacilityServiceEntityTypes):
25
25
  facility_service_entity_type = facility_service_entity_type.value
26
- self.__facility_service_url = f"{WDPRO_FACILITY_SERVICE_BASE_URL}/{facility_service_entity_type}/{self.entity_id}"
26
+ self._facility_service_url = f"{WDPRO_FACILITY_SERVICE_BASE_URL}/{facility_service_entity_type}/{self.entity_id}"
27
27
 
28
28
  @property
29
29
  def name(self) -> typing.Optional[str]:
@@ -35,7 +35,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
35
35
  """
36
36
 
37
37
  if self.disney_data is None:
38
- self.disney_data = self.get_disney_data(self.__facility_service_url)
38
+ self.disney_data = self.get_disney_data(self._facility_service_url)
39
39
  try:
40
40
  return self.disney_data["name"]
41
41
  except KeyError:
@@ -52,7 +52,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
52
52
  """
53
53
 
54
54
  if self.disney_data is None:
55
- self.disney_data = self.get_disney_data(self.__facility_service_url)
55
+ self.disney_data = self.get_disney_data(self._facility_service_url)
56
56
  try:
57
57
  return self.disney_data["type"]
58
58
  except KeyError:
@@ -68,7 +68,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
68
68
  (typing.Optional[str]): The sub type of entity, or None if it was not found.
69
69
  """
70
70
  if self.disney_data is None:
71
- self.disney_data = self.get_disney_data(self.__facility_service_url)
71
+ self.disney_data = self.get_disney_data(self._facility_service_url)
72
72
  try:
73
73
  return self.disney_data["subType"]
74
74
  except KeyError:
@@ -84,7 +84,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
84
84
  (typing.Optional[str]): The url friendly id of the entity, or None if not found.
85
85
  """
86
86
  if self.disney_data is None:
87
- self.disney_data = self.get_disney_data(self.__facility_service_url)
87
+ self.disney_data = self.get_disney_data(self._facility_service_url)
88
88
  try:
89
89
  _id = self.disney_data["urlFriendlyId"]
90
90
  return _id
@@ -101,7 +101,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
101
101
  (typing.Optional[dict[str, float]]): A dict with "lat" and "lng" keys containing the coordinates of this entity as floats, or None if no coordinates are found
102
102
  """
103
103
  if self.disney_data is None:
104
- self.disney_data = self.get_disney_data(self.__facility_service_url)
104
+ self.disney_data = self.get_disney_data(self._facility_service_url)
105
105
  try:
106
106
  return {
107
107
  "lat": float(
@@ -129,7 +129,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
129
129
  """
130
130
  # TODO check other ancestors to guess dest if not found
131
131
  if self.disney_data is None:
132
- self.disney_data = self.get_disney_data(self.__facility_service_url)
132
+ self.disney_data = self.get_disney_data(self._facility_service_url)
133
133
  try:
134
134
  return (
135
135
  self.disney_data["links"]["ancestorDestination"]["href"]
@@ -156,7 +156,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
156
156
  (typing.Optional[str]): Theme park id, or None if no such id is found.
157
157
  """
158
158
  if self.disney_data is None:
159
- self.disney_data = self.get_disney_data(self.__facility_service_url)
159
+ self.disney_data = self.get_disney_data(self._facility_service_url)
160
160
  try:
161
161
  return (
162
162
  self.disney_data["links"]["ancestorThemePark"]["href"]
@@ -176,7 +176,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
176
176
  (typing.Optional[str]): Water park id, or None if no such id is found.
177
177
  """
178
178
  if self.disney_data is None:
179
- self.disney_data = self.get_disney_data(self.__facility_service_url)
179
+ self.disney_data = self.get_disney_data(self._facility_service_url)
180
180
  try:
181
181
  return (
182
182
  self.disney_data["links"]["ancestorWaterPark"]["href"]
@@ -197,7 +197,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
197
197
  """
198
198
 
199
199
  if self.disney_data is None:
200
- self.disney_data = self.get_disney_data(self.__facility_service_url)
200
+ self.disney_data = self.get_disney_data(self._facility_service_url)
201
201
  try:
202
202
  return (
203
203
  self.disney_data["links"]["ancestorResort"]["href"]
@@ -217,7 +217,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
217
217
  (typing.Optional[str]): Land id, or None if no such id is found.
218
218
  """
219
219
  if self.disney_data is None:
220
- self.disney_data = self.get_disney_data(self.__facility_service_url)
220
+ self.disney_data = self.get_disney_data(self._facility_service_url)
221
221
  try:
222
222
  return (
223
223
  self.disney_data["links"]["ancestorLand"]["href"]
@@ -237,7 +237,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
237
237
  (typing.Optional[str]): Resort area id, or None if no such id is found.
238
238
  """
239
239
  if self.disney_data is None:
240
- self.disney_data = self.get_disney_data(self.__facility_service_url)
240
+ self.disney_data = self.get_disney_data(self._facility_service_url)
241
241
  try:
242
242
  return (
243
243
  self.disney_data["links"]["ancestorResortArea"]["href"]
@@ -257,7 +257,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
257
257
  (typing.Optional[str]): Entertainment venue id, or None if no such id is found.
258
258
  """
259
259
  if self.disney_data is None:
260
- self.disney_data = self.get_disney_data(self.__facility_service_url)
260
+ self.disney_data = self.get_disney_data(self._facility_service_url)
261
261
  try:
262
262
  return (
263
263
  self.disney_data["links"]["ancestorEntertainmentVenue"]["href"]
@@ -279,7 +279,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
279
279
  (typing.Optional[str]): Restaurant id, or None if no such id is found.
280
280
  """
281
281
  if self.disney_data is None:
282
- self.disney_data = self.get_disney_data(self.__facility_service_url)
282
+ self.disney_data = self.get_disney_data(self._facility_service_url)
283
283
  try:
284
284
  return (
285
285
  self.disney_data["links"]["ancestorRestaurant"]["href"]
@@ -322,7 +322,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
322
322
  @property
323
323
  def duration(self) -> typing.Optional[time]:
324
324
  if self.disney_data is None:
325
- self.disney_data = self.get_disney_data(self.__facility_service_url)
325
+ self.disney_data = self.get_disney_data(self._facility_service_url)
326
326
  try:
327
327
  return time.fromisoformat(
328
328
  ":".join(self.disney_data["duration"].split(":")[:3])
@@ -465,7 +465,7 @@ class EntityBase(DisneyAPIMixin, ThemeParkAPIMixin):
465
465
  if isinstance(entity_type, FacilityServiceEntityTypes):
466
466
  entity_type = entity_type.value
467
467
 
468
- children_url = f"{self.__facility_service_url}/{entity_type}"
468
+ children_url = f"{self._facility_service_url}/{entity_type}"
469
469
  data = self.get_disney_data(children_url)
470
470
  if data:
471
471
  return [
@@ -1,8 +1,141 @@
1
+ import typing
1
2
  from mousetools.entities.base import EntityBase
2
3
  from mousetools.ids import FacilityServiceEntityTypes
3
4
 
4
5
 
5
- class Menu(EntityBase):
6
+ class MenuItem:
7
+ def __init__(self, raw_item_data: dict):
8
+ self._raw_item_data = raw_item_data
9
+
10
+ def __repr__(self) -> str:
11
+ return f"MenuItem(entity_id={self.entity_id}, name={self.name})"
12
+
13
+ @property
14
+ def entity_id(self) -> typing.Optional[str]:
15
+ """
16
+ The entity id of the menu item.
17
+
18
+ Returns:
19
+ (typing.Optional[str]): The entity id of the menu item.
20
+ """
21
+ try:
22
+ return self._raw_item_data["id"]
23
+ except KeyError:
24
+ return None
25
+
26
+ @property
27
+ def name(self) -> typing.Optional[str]:
28
+ """
29
+ The name of the menu item.
30
+
31
+ Returns:
32
+ (typing.Optional[str]): The name of the menu item.
33
+ """
34
+ try:
35
+ return self._raw_item_data["name"]
36
+ except KeyError:
37
+ return None
38
+
39
+ @property
40
+ def type_name(self) -> typing.Optional[str]:
41
+ """
42
+ The type of the menu item.
43
+
44
+ Returns:
45
+ (typing.Optional[str]): The type of the menu item.
46
+ """
47
+ try:
48
+ return self._raw_item_data["type"]
49
+ except KeyError:
50
+ return None
51
+
52
+ @property
53
+ def price(self) -> typing.Optional[dict]:
54
+ """
55
+ The price of the menu item.
56
+
57
+ Examples:
58
+ {'price_qualifier': 'Per Serving', 'price_without_tax': 6.29}
59
+
60
+ Returns:
61
+ (typing.Optional[dict]): The price of the menu item.
62
+ """
63
+ try:
64
+ for i in self._raw_item_data["prices"]:
65
+ if i["type"] == "Retail":
66
+ return {
67
+ "price_without_tax": float(
68
+ i["priceSpecifications"][0]["priceWithoutTax"]
69
+ ),
70
+ "price_qualifier": i["priceSpecifications"][0][
71
+ "priceQualifier"
72
+ ],
73
+ }
74
+ except KeyError:
75
+ return None
76
+
77
+
78
+ class Menu:
79
+ def __init__(self, raw_menu_data: dict):
80
+ self._raw_menu_data = raw_menu_data
81
+
82
+ def __repr__(self) -> str:
83
+ return f"Menu(entity_id={self.entity_id}, name={self.name})"
84
+
85
+ @property
86
+ def entity_id(self) -> typing.Optional[str]:
87
+ """
88
+ The entity id of the menu.
89
+
90
+ Returns:
91
+ (typing.Optional[str]): The entity id of the menu.
92
+ """
93
+ try:
94
+ return self._raw_menu_data["id"]
95
+ except KeyError:
96
+ return None
97
+
98
+ @property
99
+ def name(self) -> typing.Optional[str]:
100
+ """
101
+ The name of the menu.
102
+
103
+ Returns:
104
+ (typing.Optional[str]): The name of the menu.
105
+ """
106
+ try:
107
+ return self._raw_menu_data["name"]
108
+ except KeyError:
109
+ return None
110
+
111
+ @property
112
+ def type_name(self) -> typing.Optional[str]:
113
+ """
114
+ The type of the menu.
115
+
116
+ Returns:
117
+ (typing.Optional[str]): The type of the menu.
118
+ """
119
+ try:
120
+ return self._raw_menu_data["type"]
121
+ except KeyError:
122
+ return None
123
+
124
+ @property
125
+ def menu_items(self) -> list[MenuItem]:
126
+ """
127
+ The menu items of the menu.
128
+
129
+ Returns:
130
+ (list[MenuItem]): The menu items of the menu.
131
+ """
132
+ try:
133
+ return [MenuItem(i) for i in self._raw_menu_data["menuItems"]]
134
+ except KeyError:
135
+ return []
136
+
137
+
138
+ class Menus(EntityBase):
6
139
  """Class for Menu Entities."""
7
140
 
8
141
  def __init__(self, entity_id: str):
@@ -10,3 +143,81 @@ class Menu(EntityBase):
10
143
  entity_id=entity_id,
11
144
  facility_service_entity_type=FacilityServiceEntityTypes.MENU_ITEMS,
12
145
  )
146
+
147
+ @property
148
+ def price_range(self) -> typing.Optional[str]:
149
+ """
150
+ The price range of the menu.
151
+
152
+ Examples:
153
+ "$ ($14.99 and under per adult)"
154
+
155
+ Returns:
156
+ (typing.Optional[str]): Price range of menu desribed in $.
157
+ """
158
+ if self.disney_data is None:
159
+ self.disney_data = self.get_disney_data(self._facility_service_url)
160
+ try:
161
+ return self.disney_data["priceRange"]
162
+ except KeyError:
163
+ return None
164
+
165
+ @property
166
+ def service_style(self) -> typing.Optional[str]:
167
+ """
168
+ The service style of the menu.
169
+
170
+ Returns:
171
+ (typing.Optional[str]): The service style of the menu.
172
+ """
173
+ if self.disney_data is None:
174
+ self.disney_data = self.get_disney_data(self._facility_service_url)
175
+ try:
176
+ return self.disney_data["serviceStyle"]
177
+ except KeyError:
178
+ return None
179
+
180
+ @property
181
+ def meal_period_type(self) -> typing.Optional[str]:
182
+ """
183
+ The meal period type of the menu.
184
+
185
+ Returns:
186
+ (typing.Optional[str]): The meal period type of the menu.
187
+ """
188
+ if self.disney_data is None:
189
+ self.disney_data = self.get_disney_data(self._facility_service_url)
190
+ try:
191
+ return self.disney_data["mealPeriodType"]
192
+ except KeyError:
193
+ return None
194
+
195
+ @property
196
+ def primary_cuisine_type(self) -> typing.Optional[str]:
197
+ """
198
+ The primary cuisine type of the menu.
199
+
200
+ Returns:
201
+ (typing.Optional[str]): The primary cuisine type of the menu.
202
+ """
203
+ if self.disney_data is None:
204
+ self.disney_data = self.get_disney_data(self._facility_service_url)
205
+ try:
206
+ return self.disney_data["primaryCuisineType"]
207
+ except KeyError:
208
+ return None
209
+
210
+ @property
211
+ def menus(self) -> list[Menu]:
212
+ """
213
+ Returns a list of all the menus associated with this entity.
214
+
215
+ Returns:
216
+ (list[Menu]): List of Menu objects that are associated with this entity.
217
+ """
218
+ if self.disney_data is None:
219
+ self.disney_data = self.get_disney_data(self._facility_service_url)
220
+ try:
221
+ return [Menu(i) for i in self.disney_data["menus"]]
222
+ except KeyError:
223
+ return []
@@ -1,5 +1,9 @@
1
+ import typing
1
2
  from mousetools.entities.base import EntityBase
2
3
  from mousetools.ids import FacilityServiceEntityTypes
4
+ import logging
5
+
6
+ logger = logging.getLogger(__name__)
3
7
 
4
8
 
5
9
  class Restaurant(EntityBase):
@@ -10,3 +14,39 @@ class Restaurant(EntityBase):
10
14
  entity_id=entity_id,
11
15
  facility_service_entity_type=FacilityServiceEntityTypes.RESTAURANTS,
12
16
  )
17
+
18
+ @property
19
+ def service_styles(self) -> typing.Optional[list[str]]:
20
+ """
21
+ The service styles offered by the restaurant.
22
+
23
+ Returns:
24
+ (typing.Optional[list[str]]): The service styles offered by the restaurant.
25
+ """
26
+ if self.disney_data is None:
27
+ self.disney_data = self.get_disney_data(self._facility_service_url)
28
+ try:
29
+ return self.disney_data["serviceStyles"]
30
+ except KeyError:
31
+ logger.debug("No service styles found for %s", self.entity_id)
32
+ return None
33
+
34
+ @property
35
+ def menu_id(self) -> typing.Optional[str]:
36
+ """
37
+ The menu id associated with the restaurant.
38
+
39
+ Returns:
40
+ (typing.Optional[str]): The menu id associated with the restaurant.
41
+ """
42
+ if self.disney_data is None:
43
+ self.disney_data = self.get_disney_data(self._facility_service_url)
44
+ try:
45
+ return (
46
+ self.disney_data["menuItems"][0]["links"]["self"]["href"]
47
+ .split("?")[0]
48
+ .split("/")[-1]
49
+ )
50
+ except KeyError:
51
+ logger.debug("No menu id found for %s", self.entity_id)
52
+ return None