themeparks 2.0.0__tar.gz → 2.0.1__tar.gz

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,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.1] - 2026-09-01
4
+ ### Fixed
5
+ - `PriceData.amount` is now nullable. The API returns `null` when a paid queue
6
+ exists but the provider does not publish a price, and `0` only when the queue
7
+ is genuinely free. Both previously arrived as `0`, so an unknown price was
8
+ indistinguishable from a free one.
9
+
10
+ Before this, a single null amount on one attraction made pydantic reject the
11
+ **entire** live response for that park, not just the one field.
12
+
13
+ Code testing `if price.amount:` or `if not price.amount:` now conflates
14
+ "free" with "price unknown" — the exact confusion this change exists to
15
+ remove. Switch to an explicit check:
16
+
17
+ ```python
18
+ if price.amount is None:
19
+ label = "price not published"
20
+ else:
21
+ label = f"{price.currency} {price.amount / 100:.2f}"
22
+ ```
23
+
24
+ `price.formatted` is optional and may be absent when the amount is unknown,
25
+ so do not rely on it alone to detect the case.
26
+
3
27
  ## [2.0.0] - 2026-04-15
4
28
  First stable v2 release. Identical surface to `2.0.0a1` after a brief alpha
5
29
  soak; no code changes since `2.0.0a1`. Bumped `Development Status` classifier
@@ -170,7 +170,7 @@ The async surface mirrors the sync surface method-for-method.
170
170
 
171
171
  ## New in v2 (not in v1)
172
172
 
173
- - `tp.entity(id).walk()` — breadth-first iterator over every descendant.
173
+ - `tp.entity(id).walk()` — iterator over every descendant in a single API call (the `/children` endpoint already returns the full subtree).
174
174
  - `tp.entity(id).schedule.range(start, end)` — stitches monthly schedule
175
175
  responses into a single sorted, filtered list.
176
176
  - `tp.destinations.find(query)` — case-insensitive lookup by slug or name.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: themeparks
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: Official SDK for the ThemeParks.wiki API
5
5
  Project-URL: Homepage, https://api.themeparks.wiki
6
6
  Project-URL: Source, https://github.com/ThemeParks/ThemeParks_Python
@@ -30,7 +30,7 @@ Requires-Dist: mypy>=1.10; extra == 'dev'
30
30
  Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
31
31
  Requires-Dist: pytest-recording>=0.13; extra == 'dev'
32
32
  Requires-Dist: pytest>=8; extra == 'dev'
33
- Requires-Dist: ruff>=0.4; extra == 'dev'
33
+ Requires-Dist: ruff<0.17,>=0.4; extra == 'dev'
34
34
  Provides-Extra: docs
35
35
  Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
36
36
  Requires-Dist: mkdocs>=1.5; extra == 'docs'
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "themeparks"
7
- version = "2.0.0"
7
+ version = "2.0.1"
8
8
  description = "Official SDK for the ThemeParks.wiki API"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -40,7 +40,9 @@ dev = [
40
40
  "pytest>=8",
41
41
  "pytest-asyncio>=0.23",
42
42
  "pytest-recording>=0.13",
43
- "ruff>=0.4",
43
+ # Upper-bounded: an unpinned minor bump is what started reformatting
44
+ # Markdown code blocks and turned CI red on unrelated PRs.
45
+ "ruff>=0.4,<0.17",
44
46
  "mypy>=1.10",
45
47
  "datamodel-code-generator[http]>=0.25",
46
48
  ]
@@ -63,6 +65,11 @@ asyncio_mode = "auto"
63
65
  [tool.ruff]
64
66
  line-length = 100
65
67
  target-version = "py39"
68
+ # Markdown is documentation, not source. Ruff 0.16 began formatting Python
69
+ # blocks inside it, which rewrites hand-written examples in README.md,
70
+ # MIGRATION.md and docs/ — CI has been failing `ruff format --check .` on
71
+ # those four files regardless of what any PR changes. Prose stays ours.
72
+ extend-exclude = ["*.md"]
66
73
 
67
74
  [tool.ruff.lint]
68
75
  select = ["E", "F", "W", "I", "N", "UP", "B", "A", "SIM", "PL"]
@@ -72,7 +79,9 @@ select = ["E", "F", "W", "I", "N", "UP", "B", "A", "SIM", "PL"]
72
79
  "themeparks/_errors.py" = ["A001", "UP045"]
73
80
  "themeparks/_transport.py" = ["A004"]
74
81
  "themeparks/__init__.py" = ["A004"]
75
- "themeparks/_generated/*.py" = ["N815", "F401"]
82
+ # E501: field descriptions come from the upstream spec, so line length is not
83
+ # this repo's to choose. The PriceData.amount description is already over.
84
+ "themeparks/_generated/*.py" = ["N815", "F401", "E501"]
76
85
 
77
86
  [tool.mypy]
78
87
  python_version = "3.9"
@@ -118,6 +118,9 @@ class ThemeParks:
118
118
  def __exit__(self, exc_type: Any, exc: Any, tb: Any) -> None:
119
119
  self.close()
120
120
 
121
+ def __repr__(self) -> str:
122
+ return f"ThemeParks(base_url={str(self._client.base_url).rstrip('/')!r})"
123
+
121
124
 
122
125
  class AsyncThemeParks:
123
126
  """Asynchronous mirror of :class:`ThemeParks`.
@@ -171,3 +174,6 @@ class AsyncThemeParks:
171
174
 
172
175
  async def __aexit__(self, exc_type: Any, exc: Any, tb: Any) -> None:
173
176
  await self.close()
177
+
178
+ def __repr__(self) -> str:
179
+ return f"AsyncThemeParks(base_url={str(self._client.base_url).rstrip('/')!r})"
@@ -0,0 +1,516 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: https://api.themeparks.wiki/docs/v1.yaml
3
+
4
+ from __future__ import annotations
5
+
6
+ from enum import Enum
7
+ from typing import Annotated, Any
8
+
9
+ from pydantic import AwareDatetime, BaseModel, ConfigDict, Field
10
+
11
+
12
+ class BoardingGroupState(Enum):
13
+ """
14
+ State of boarding group availability
15
+ """
16
+
17
+ AVAILABLE = "AVAILABLE"
18
+ PAUSED = "PAUSED"
19
+ CLOSED = "CLOSED"
20
+
21
+
22
+ class DiningAvailability(BaseModel):
23
+ partySize: float | None = None
24
+ """
25
+ Available party size
26
+ """
27
+ waitTime: float | None = None
28
+ """
29
+ Current wait time in minutes
30
+ """
31
+
32
+
33
+ class EntityLocation(BaseModel):
34
+ latitude: float | None = None
35
+ """
36
+ Latitude coordinate of the entity location
37
+ """
38
+ longitude: float | None = None
39
+ """
40
+ Longitude coordinate of the entity location
41
+ """
42
+
43
+
44
+ class ScheduleEntry(BaseModel):
45
+ """
46
+ Represents a single schedule entry
47
+ """
48
+
49
+ model_config = ConfigDict(
50
+ extra="allow",
51
+ )
52
+ date: str
53
+ """
54
+ The date of the schedule entry
55
+ """
56
+ type: str
57
+ """
58
+ Type of schedule entry e.g. OPERATING, EXTRA_HOURS, etc.
59
+ """
60
+ description: str | None = None
61
+ """
62
+ Optional description of the schedule entry
63
+ """
64
+ openingTime: str
65
+ """
66
+ Opening time for this schedule entry
67
+ """
68
+ closingTime: str
69
+ """
70
+ Closing time for this schedule entry
71
+ """
72
+
73
+
74
+ class EntityType1(Enum):
75
+ """
76
+ Type of entity
77
+ """
78
+
79
+ DESTINATION = "DESTINATION"
80
+ PARK = "PARK"
81
+ ATTRACTION = "ATTRACTION"
82
+ RESTAURANT = "RESTAURANT"
83
+ HOTEL = "HOTEL"
84
+ SHOW = "SHOW"
85
+
86
+
87
+ class EntityType(Enum):
88
+ """
89
+ Type of entity in the theme park system
90
+ """
91
+
92
+ DESTINATION = "DESTINATION"
93
+ PARK = "PARK"
94
+ ATTRACTION = "ATTRACTION"
95
+ RESTAURANT = "RESTAURANT"
96
+ HOTEL = "HOTEL"
97
+ SHOW = "SHOW"
98
+
99
+
100
+ class StandbyQueue(BaseModel):
101
+ waitTime: float | None = None
102
+ """
103
+ Current standby wait time in minutes
104
+ """
105
+
106
+
107
+ class SingleRiderQueue(BaseModel):
108
+ waitTime: float | None = None
109
+ """
110
+ Current single rider wait time in minutes
111
+ """
112
+
113
+
114
+ class BoardingGroupQueue(BaseModel):
115
+ allocationStatus: BoardingGroupState | None = None
116
+ currentGroupStart: float | None = None
117
+ """
118
+ Current boarding group start number
119
+ """
120
+ currentGroupEnd: float | None = None
121
+ """
122
+ Current boarding group end number
123
+ """
124
+ nextAllocationTime: AwareDatetime | None = None
125
+ """
126
+ Next boarding group allocation time
127
+ """
128
+ estimatedWait: float | None = None
129
+ """
130
+ Estimated wait time in minutes
131
+ """
132
+
133
+
134
+ class PaidStandbyQueue(BaseModel):
135
+ waitTime: float | None = None
136
+ """
137
+ Current paid standby wait time in minutes
138
+ """
139
+
140
+
141
+ class LiveShowTime(BaseModel):
142
+ type: str
143
+ """
144
+ Type of show time entry
145
+ """
146
+ startTime: AwareDatetime | None = None
147
+ """
148
+ Start time of the show
149
+ """
150
+ endTime: AwareDatetime | None = None
151
+ """
152
+ End time of the show
153
+ """
154
+
155
+
156
+ class LiveStatusType(Enum):
157
+ """
158
+ Current operating status of an entity
159
+ """
160
+
161
+ OPERATING = "OPERATING"
162
+ DOWN = "DOWN"
163
+ CLOSED = "CLOSED"
164
+ REFURBISHMENT = "REFURBISHMENT"
165
+
166
+
167
+ class Park(BaseModel):
168
+ id: str
169
+ """
170
+ Unique identifier of the park
171
+ """
172
+ name: str
173
+ """
174
+ Name of the park
175
+ """
176
+
177
+
178
+ class EntityType2(Enum):
179
+ """
180
+ Type of entity
181
+ """
182
+
183
+ DESTINATION = "DESTINATION"
184
+ PARK = "PARK"
185
+ ATTRACTION = "ATTRACTION"
186
+ RESTAURANT = "RESTAURANT"
187
+ HOTEL = "HOTEL"
188
+ SHOW = "SHOW"
189
+
190
+
191
+ class PriceData(BaseModel):
192
+ amount: float | None = None
193
+ """
194
+ Numerical price amount, in the currency's lowest denomination (e.g. cents). null when the item costs money but the provider does not publish an amount; 0 means genuinely free
195
+ """
196
+ currency: str
197
+ """
198
+ Currency code
199
+ """
200
+ formatted: str | None = None
201
+ """
202
+ Formatted price string
203
+ """
204
+
205
+
206
+ class Type(Enum):
207
+ """
208
+ Type of schedule entry
209
+ """
210
+
211
+ OPERATING = "OPERATING"
212
+ TICKETED_EVENT = "TICKETED_EVENT"
213
+ PRIVATE_EVENT = "PRIVATE_EVENT"
214
+ EXTRA_HOURS = "EXTRA_HOURS"
215
+ INFO = "INFO"
216
+
217
+
218
+ class ReturnTimeState(Enum):
219
+ """
220
+ State of return time availability
221
+ """
222
+
223
+ AVAILABLE = "AVAILABLE"
224
+ TEMP_FULL = "TEMP_FULL"
225
+ FINISHED = "FINISHED"
226
+
227
+
228
+ class Price(BaseModel):
229
+ amount: float
230
+ """
231
+ Price amount
232
+ """
233
+ currency: str
234
+ """
235
+ Currency code
236
+ """
237
+ formatted: str | None = None
238
+ """
239
+ Formatted price string
240
+ """
241
+
242
+
243
+ class SchedulePriceType(Enum):
244
+ """
245
+ Type of schedule price
246
+ """
247
+
248
+ ADMISSION = "ADMISSION"
249
+ PACKAGE = "PACKAGE"
250
+ ATTRACTION = "ATTRACTION"
251
+
252
+
253
+ class TagData(BaseModel):
254
+ tag: str
255
+ """
256
+ Tag identifier
257
+ """
258
+ tagName: str
259
+ """
260
+ Human readable tag name
261
+ """
262
+ id: str | None = None
263
+ """
264
+ Unique identifier
265
+ """
266
+ value: Any | None = None
267
+ """
268
+ Tag value - can be string, number or object
269
+ """
270
+
271
+
272
+ class DestinationEntry(BaseModel):
273
+ id: str
274
+ """
275
+ Unique identifier of the destination
276
+ """
277
+ name: str
278
+ """
279
+ Name of the destination
280
+ """
281
+ slug: str | None = None
282
+ """
283
+ URL-friendly slug for the destination
284
+ """
285
+ externalId: str | None = None
286
+ """
287
+ External entity ID from the source data provider
288
+ """
289
+ parks: list[Park]
290
+ """
291
+ Array of parks within this destination
292
+ """
293
+
294
+
295
+ class DestinationsResponse(BaseModel):
296
+ destinations: list[DestinationEntry]
297
+ """
298
+ Array of all destinations
299
+ """
300
+
301
+
302
+ class EntityChild(BaseModel):
303
+ id: str
304
+ """
305
+ Unique entity identifier
306
+ """
307
+ name: str
308
+ """
309
+ Entity name
310
+ """
311
+ entityType: EntityType
312
+ externalId: str | None = None
313
+ """
314
+ External identifier
315
+ """
316
+ parentId: str | None = None
317
+ """
318
+ Parent entity identifier
319
+ """
320
+ location: EntityLocation | None = None
321
+
322
+
323
+ class EntityChildrenResponse(BaseModel):
324
+ id: str | None = None
325
+ """
326
+ Parent entity identifier
327
+ """
328
+ name: str | None = None
329
+ """
330
+ Parent entity name
331
+ """
332
+ entityType: EntityType | None = None
333
+ timezone: str | None = None
334
+ """
335
+ Entity timezone
336
+ """
337
+ children: list[EntityChild] | None = None
338
+
339
+
340
+ class EntityData(BaseModel):
341
+ id: str
342
+ """
343
+ Unique entity identifier
344
+ """
345
+ name: str
346
+ """
347
+ Entity name
348
+ """
349
+ entityType: EntityType
350
+ parentId: str | None = None
351
+ """
352
+ Parent entity identifier
353
+ """
354
+ destinationId: str | None = None
355
+ """
356
+ DestinationEntry identifier
357
+ """
358
+ timezone: str
359
+ """
360
+ Entity timezone
361
+ """
362
+ location: EntityLocation | None = None
363
+ tags: list[TagData] | None = None
364
+
365
+
366
+ class ReturnTimeQueue(BaseModel):
367
+ state: ReturnTimeState | None = None
368
+ returnStart: AwareDatetime | None = None
369
+ """
370
+ Start time of return window
371
+ """
372
+ returnEnd: AwareDatetime | None = None
373
+ """
374
+ End time of return window
375
+ """
376
+
377
+
378
+ class PaidReturnTimeQueue(BaseModel):
379
+ state: ReturnTimeState | None = None
380
+ returnStart: AwareDatetime | None = None
381
+ returnEnd: AwareDatetime | None = None
382
+ price: PriceData | None = None
383
+
384
+
385
+ class LiveQueue(BaseModel):
386
+ STANDBY: StandbyQueue | None = None
387
+ SINGLE_RIDER: SingleRiderQueue | None = None
388
+ RETURN_TIME: ReturnTimeQueue | None = None
389
+ PAID_RETURN_TIME: PaidReturnTimeQueue | None = None
390
+ BOARDING_GROUP: BoardingGroupQueue | None = None
391
+ PAID_STANDBY: PaidStandbyQueue | None = None
392
+
393
+
394
+ class SchedulePriceObject(BaseModel):
395
+ type: SchedulePriceType | None = None
396
+ """
397
+ Type of price object
398
+ """
399
+ id: str | None = None
400
+ """
401
+ Unique identifier
402
+ """
403
+ name: str | None = None
404
+ """
405
+ Name of the price object
406
+ """
407
+ price: Price | None = None
408
+ available: bool | None = None
409
+ """
410
+ Whether this price option is available
411
+ """
412
+
413
+
414
+ class EntityLiveData(BaseModel):
415
+ id: str
416
+ """
417
+ Entity identifier
418
+ """
419
+ name: str
420
+ """
421
+ Entity name
422
+ """
423
+ entityType: EntityType
424
+ status: LiveStatusType | None = None
425
+ lastUpdated: AwareDatetime
426
+ """
427
+ Last update timestamp
428
+ """
429
+ queue: LiveQueue | None = None
430
+ showtimes: list[LiveShowTime] | None = None
431
+ operatingHours: list[LiveShowTime] | None = None
432
+ diningAvailability: list[DiningAvailability] | None = None
433
+
434
+
435
+ class EntityLiveDataResponse(BaseModel):
436
+ id: str | None = None
437
+ """
438
+ Entity identifier
439
+ """
440
+ name: str | None = None
441
+ """
442
+ Entity name
443
+ """
444
+ entityType: EntityType | None = None
445
+ timezone: str | None = None
446
+ """
447
+ Entity timezone
448
+ """
449
+ liveData: list[EntityLiveData] | None = None
450
+
451
+
452
+ class PricedScheduleEntry(BaseModel):
453
+ date: str
454
+ """
455
+ Schedule date
456
+ """
457
+ openingTime: AwareDatetime
458
+ """
459
+ Opening time
460
+ """
461
+ closingTime: AwareDatetime
462
+ """
463
+ Closing time
464
+ """
465
+ type: Type
466
+ """
467
+ Type of schedule entry
468
+ """
469
+ purchases: list[SchedulePriceObject] | None = None
470
+ """
471
+ Available purchases for this schedule entry
472
+ """
473
+
474
+
475
+ class ParkSchedule(BaseModel):
476
+ id: str | None = None
477
+ """
478
+ Entity identifier
479
+ """
480
+ name: str | None = None
481
+ """
482
+ Entity name
483
+ """
484
+ entityType: EntityType2 | None = None
485
+ """
486
+ Type of entity
487
+ """
488
+ timezone: str | None = None
489
+ """
490
+ Entity timezone
491
+ """
492
+ schedule: list[PricedScheduleEntry] | None = None
493
+
494
+
495
+ class EntityScheduleResponse(BaseModel):
496
+ id: str | None = None
497
+ """
498
+ Entity identifier
499
+ """
500
+ name: str | None = None
501
+ """
502
+ Entity name
503
+ """
504
+ entityType: EntityType1 | None = None
505
+ """
506
+ Type of entity
507
+ """
508
+ timezone: str | None = None
509
+ """
510
+ Entity timezone
511
+ """
512
+ schedule: list[ScheduleEntry] | None = None
513
+ parks: list[ParkSchedule] | None = None
514
+ """
515
+ Only included for destinations, lists all parks within the destination
516
+ """
@@ -1,221 +0,0 @@
1
- # generated by datamodel-codegen:
2
- # filename: https://api.themeparks.wiki/docs/v1.yaml
3
-
4
- from __future__ import annotations
5
-
6
- from enum import Enum
7
- from typing import Annotated, Any
8
-
9
- from pydantic import AwareDatetime, BaseModel, Field
10
-
11
-
12
- class EntityType(Enum):
13
- DESTINATION = "DESTINATION"
14
- PARK = "PARK"
15
- ATTRACTION = "ATTRACTION"
16
- RESTAURANT = "RESTAURANT"
17
- HOTEL = "HOTEL"
18
- SHOW = "SHOW"
19
-
20
-
21
- class LiveStatusType(Enum):
22
- OPERATING = "OPERATING"
23
- DOWN = "DOWN"
24
- CLOSED = "CLOSED"
25
- REFURBISHMENT = "REFURBISHMENT"
26
-
27
-
28
- class ReturnTimeState(Enum):
29
- AVAILABLE = "AVAILABLE"
30
- TEMP_FULL = "TEMP_FULL"
31
- FINISHED = "FINISHED"
32
-
33
-
34
- class BoardingGroupState(Enum):
35
- AVAILABLE = "AVAILABLE"
36
- PAUSED = "PAUSED"
37
- CLOSED = "CLOSED"
38
-
39
-
40
- class PriceData(BaseModel):
41
- amount: float
42
- currency: str
43
- formatted: str | None = None
44
-
45
-
46
- class StandbyQueue(BaseModel):
47
- waitTime: float | None = None
48
-
49
-
50
- class SingleRiderQueue(BaseModel):
51
- waitTime: float | None = None
52
-
53
-
54
- class ReturnTimeQueue(BaseModel):
55
- state: ReturnTimeState | None = None
56
- returnStart: AwareDatetime | None = None
57
- returnEnd: AwareDatetime | None = None
58
-
59
-
60
- class PaidReturnTimeQueue(BaseModel):
61
- state: ReturnTimeState | None = None
62
- returnStart: AwareDatetime | None = None
63
- returnEnd: AwareDatetime | None = None
64
- price: PriceData | None = None
65
-
66
-
67
- class BoardingGroupQueue(BaseModel):
68
- allocationStatus: BoardingGroupState | None = None
69
- currentGroupStart: float | None = None
70
- currentGroupEnd: float | None = None
71
- nextAllocationTime: AwareDatetime | None = None
72
- estimatedWait: float | None = None
73
-
74
-
75
- class PaidStandbyQueue(BaseModel):
76
- waitTime: float | None = None
77
-
78
-
79
- class LiveQueue(BaseModel):
80
- STANDBY: StandbyQueue | None = None
81
- SINGLE_RIDER: SingleRiderQueue | None = None
82
- RETURN_TIME: ReturnTimeQueue | None = None
83
- PAID_RETURN_TIME: PaidReturnTimeQueue | None = None
84
- BOARDING_GROUP: BoardingGroupQueue | None = None
85
- PAID_STANDBY: PaidStandbyQueue | None = None
86
-
87
-
88
- class LiveShowTime(BaseModel):
89
- type: str
90
- startTime: AwareDatetime | None = None
91
- endTime: AwareDatetime | None = None
92
-
93
-
94
- class DiningAvailability(BaseModel):
95
- partySize: float | None = None
96
- waitTime: float | None = None
97
-
98
-
99
- class TagData(BaseModel):
100
- tag: str
101
- tagName: str
102
- id: str | None = None
103
- value: str | float | dict[str, Any] | None = None
104
-
105
-
106
- class Location(BaseModel):
107
- latitude: float | None = None
108
- longitude: float | None = None
109
-
110
-
111
- class EntityData(BaseModel):
112
- id: str
113
- name: str
114
- entityType: EntityType
115
- parentId: str | None = None
116
- destinationId: str | None = None
117
- timezone: str
118
- location: Location | None = None
119
- tags: list[TagData] | None = None
120
-
121
-
122
- class EntityChild(BaseModel):
123
- id: str
124
- name: str
125
- entityType: EntityType
126
- externalId: str | None = None
127
- parentId: str | None = None
128
- location: Location | None = None
129
-
130
-
131
- class EntityChildrenResponse(BaseModel):
132
- id: str | None = None
133
- name: str | None = None
134
- entityType: EntityType | None = None
135
- timezone: str | None = None
136
- children: list[EntityChild] | None = None
137
-
138
-
139
- class EntityLiveData(BaseModel):
140
- id: str
141
- name: str
142
- entityType: EntityType
143
- status: LiveStatusType | None = None
144
- lastUpdated: AwareDatetime
145
- queue: LiveQueue | None = None
146
- showtimes: list[LiveShowTime] | None = None
147
- operatingHours: list[LiveShowTime] | None = None
148
- diningAvailability: list[DiningAvailability] | None = None
149
-
150
-
151
- class EntityLiveDataResponse(BaseModel):
152
- id: str | None = None
153
- name: str | None = None
154
- entityType: EntityType | None = None
155
- timezone: str | None = None
156
- liveData: list[EntityLiveData] | None = None
157
-
158
-
159
- class Type(Enum):
160
- ADMISSION = "ADMISSION"
161
- PACKAGE = "PACKAGE"
162
- ATTRACTION = "ATTRACTION"
163
-
164
-
165
- class SchedulePriceObject(BaseModel):
166
- type: Type | None = None
167
- id: str | None = None
168
- name: str | None = None
169
- price: PriceData | None = None
170
- available: bool | None = None
171
-
172
-
173
- class Type1(Enum):
174
- OPERATING = "OPERATING"
175
- TICKETED_EVENT = "TICKETED_EVENT"
176
- PRIVATE_EVENT = "PRIVATE_EVENT"
177
- EXTRA_HOURS = "EXTRA_HOURS"
178
- INFO = "INFO"
179
-
180
-
181
- class ScheduleEntry(BaseModel):
182
- date: str
183
- openingTime: AwareDatetime
184
- closingTime: AwareDatetime
185
- type: Type1
186
- purchases: list[SchedulePriceObject] | None = None
187
-
188
-
189
- class EntityScheduleResponse(BaseModel):
190
- id: str | None = None
191
- name: str | None = None
192
- entityType: EntityType | None = None
193
- timezone: str | None = None
194
- schedule: list[ScheduleEntry] | None = None
195
- parks: list[EntityScheduleResponse] | None = None
196
- """
197
- Only included for destinations, this will list all parks within the destination
198
- """
199
-
200
-
201
- class DestinationParkEntry(BaseModel):
202
- id: str | None = None
203
- name: str | None = None
204
-
205
-
206
- class DestinationEntry(BaseModel):
207
- id: str | None = None
208
- name: str | None = None
209
- slug: str | None = None
210
- externalId: str | None = None
211
- """
212
- External entity ID from the source data provider
213
- """
214
- parks: list[DestinationParkEntry] | None = None
215
-
216
-
217
- class DestinationsResponse(BaseModel):
218
- destinations: list[DestinationEntry] | None = None
219
-
220
-
221
- EntityScheduleResponse.model_rebuild()
File without changes
File without changes
File without changes