MouseTools 3.0.0.dev1__tar.gz → 3.0.0.dev2__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.
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2/MouseTools.egg-info}/PKG-INFO +41 -3
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2}/MouseTools.egg-info/SOURCES.txt +7 -1
- mousetools-3.0.0.dev2/MouseTools.egg-info/requires.txt +2 -0
- {mousetools-3.0.0.dev1/MouseTools.egg-info → mousetools-3.0.0.dev2}/PKG-INFO +41 -3
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2}/README.md +37 -1
- mousetools-3.0.0.dev2/mousetools/__init__.py +7 -0
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2}/mousetools/auth.py +13 -3
- mousetools-3.0.0.dev2/mousetools/entities/__init__.py +41 -0
- mousetools-3.0.0.dev2/mousetools/entities/attraction.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/base.py +487 -0
- mousetools-3.0.0.dev2/mousetools/entities/character.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/destination.py +16 -0
- mousetools-3.0.0.dev2/mousetools/entities/dining_event.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/dinner_show.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/entertainment.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/entertainment_venue.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/event.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/guest_services.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/land.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/menu.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/merchandise_facility.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/park.py +42 -0
- mousetools-3.0.0.dev2/mousetools/entities/point_of_interest.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/resort.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/resort_area.py +12 -0
- mousetools-3.0.0.dev2/mousetools/entities/restaurant.py +12 -0
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2}/mousetools/exceptions.py +3 -3
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2}/mousetools/ids.py +42 -36
- mousetools-3.0.0.dev2/mousetools/mixins/disney.py +55 -0
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2}/mousetools/mixins/themeparksapi.py +20 -14
- mousetools-3.0.0.dev2/mousetools/urls.py +4 -0
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2}/pyproject.toml +115 -78
- mousetools-3.0.0.dev2/tests/test_auth.py +8 -0
- mousetools-3.0.0.dev2/tests/test_entities.py +236 -0
- mousetools-3.0.0.dev2/tests/test_ids.py +103 -0
- mousetools-3.0.0.dev1/MouseTools.egg-info/requires.txt +0 -1
- mousetools-3.0.0.dev1/mousetools/__init__.py +0 -13
- mousetools-3.0.0.dev1/mousetools/entities/__init__.py +0 -13
- mousetools-3.0.0.dev1/mousetools/entities/attraction.py +0 -8
- mousetools-3.0.0.dev1/mousetools/entities/base.py +0 -381
- mousetools-3.0.0.dev1/mousetools/entities/destination.py +0 -8
- mousetools-3.0.0.dev1/mousetools/entities/dining_event.py +0 -15
- mousetools-3.0.0.dev1/mousetools/entities/entertainment.py +0 -8
- mousetools-3.0.0.dev1/mousetools/entities/entertainment_venue.py +0 -8
- mousetools-3.0.0.dev1/mousetools/entities/event.py +0 -8
- mousetools-3.0.0.dev1/mousetools/entities/merchandise_facility.py +0 -8
- mousetools-3.0.0.dev1/mousetools/entities/park.py +0 -8
- mousetools-3.0.0.dev1/mousetools/entities/resort.py +0 -8
- mousetools-3.0.0.dev1/mousetools/entities/restaurant.py +0 -8
- mousetools-3.0.0.dev1/mousetools/mixins/disney.py +0 -64
- mousetools-3.0.0.dev1/mousetools/urls.py +0 -5
- mousetools-3.0.0.dev1/tests/test_auth.py +0 -12
- mousetools-3.0.0.dev1/tests/test_entities.py +0 -45
- mousetools-3.0.0.dev1/tests/test_entity.py +0 -45
- mousetools-3.0.0.dev1/tests/test_ids.py +0 -47
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2}/LICENSE +0 -0
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2}/MouseTools.egg-info/dependency_links.txt +0 -0
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2}/MouseTools.egg-info/top_level.txt +0 -0
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2}/mousetools/mixins/__init__.py +0 -0
- {mousetools-3.0.0.dev1 → mousetools-3.0.0.dev2}/setup.cfg +0 -0
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: MouseTools
|
|
3
|
-
Version: 3.0.0.
|
|
3
|
+
Version: 3.0.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
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
9
9
|
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.9
|
|
10
11
|
Description-Content-Type: text/markdown
|
|
11
12
|
License-File: LICENSE
|
|
12
|
-
Requires-Dist:
|
|
13
|
+
Requires-Dist: httpx>=0.27.2
|
|
14
|
+
Requires-Dist: tzdata>=2024.1
|
|
13
15
|
|
|
14
16
|
# MouseTools
|
|
15
17
|
[](https://badge.fury.io/py/MouseTools) [](https://pepy.tech/project/mousetools)
|
|
@@ -17,7 +19,7 @@ Requires-Dist: requests
|
|
|
17
19
|
|
|
18
20
|
An unofficial Python wrapper for the Disney API. Data is pulled directly from Disney. This package supports Walt Disney World and Disneyland.
|
|
19
21
|
|
|
20
|
-
Read the [documentation](https://caratozzoloxyz.gitlab.io/public/MouseTools/)
|
|
22
|
+
Read the [documentation](https://caratozzoloxyz.gitlab.io/public/MouseTools/).
|
|
21
23
|
|
|
22
24
|
|
|
23
25
|
### Installation
|
|
@@ -30,6 +32,42 @@ You can also install directly from this repo in case of any changes not uploaded
|
|
|
30
32
|
pip install git+https://gitlab.com/caratozzoloxyz/public/MouseTools
|
|
31
33
|
```
|
|
32
34
|
|
|
35
|
+
### Quick Start
|
|
36
|
+
|
|
37
|
+
Define an entity object directly.
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from mousetools.entities import Attraction
|
|
41
|
+
|
|
42
|
+
big_thunder = Attraction("80010110")
|
|
43
|
+
|
|
44
|
+
print(big_thunder.name)
|
|
45
|
+
#> 'Big Thunder Mountain Railroad'
|
|
46
|
+
|
|
47
|
+
print(big_thunder.ancestor_theme_park_id)
|
|
48
|
+
#> '80007944'
|
|
49
|
+
|
|
50
|
+
print(big_thunder.get_status())
|
|
51
|
+
#> 'OPERATING'
|
|
52
|
+
|
|
53
|
+
print(big_thunder.get_wait_time())
|
|
54
|
+
#> 45
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Use the already created destination objects to get children entities.
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
from mousetools.entities import WALT_DISNEY_WORLD_DESTINATION, DISNEYLAND_RESORT_DESTINATION
|
|
62
|
+
from mousetools.ids import FacilityServiceEntityTypes
|
|
63
|
+
|
|
64
|
+
print(WALT_DISNEY_WORLD_DESTINATION.get_children_entity_ids(FacilityServiceEntityTypes.ENTERTAINMENT_VENUES))
|
|
65
|
+
#> ['10460', '80008033', '80008259']
|
|
66
|
+
|
|
67
|
+
print(DISNEYLAND_RESORT_DESTINATION.get_children_entity_ids(FacilityServiceEntityTypes.RESORT_AREAS))
|
|
68
|
+
#> ['330338', '15597760']
|
|
69
|
+
```
|
|
70
|
+
|
|
33
71
|
### License
|
|
34
72
|
This project is distributed under the MIT license. For more information see [LICENSE](https://gitlab.com/caratozzoloxyz/public/MouseTools/-/blob/master/LICENSE?ref_type=heads)
|
|
35
73
|
|
|
@@ -14,19 +14,25 @@ mousetools/urls.py
|
|
|
14
14
|
mousetools/entities/__init__.py
|
|
15
15
|
mousetools/entities/attraction.py
|
|
16
16
|
mousetools/entities/base.py
|
|
17
|
+
mousetools/entities/character.py
|
|
17
18
|
mousetools/entities/destination.py
|
|
18
19
|
mousetools/entities/dining_event.py
|
|
20
|
+
mousetools/entities/dinner_show.py
|
|
19
21
|
mousetools/entities/entertainment.py
|
|
20
22
|
mousetools/entities/entertainment_venue.py
|
|
21
23
|
mousetools/entities/event.py
|
|
24
|
+
mousetools/entities/guest_services.py
|
|
25
|
+
mousetools/entities/land.py
|
|
26
|
+
mousetools/entities/menu.py
|
|
22
27
|
mousetools/entities/merchandise_facility.py
|
|
23
28
|
mousetools/entities/park.py
|
|
29
|
+
mousetools/entities/point_of_interest.py
|
|
24
30
|
mousetools/entities/resort.py
|
|
31
|
+
mousetools/entities/resort_area.py
|
|
25
32
|
mousetools/entities/restaurant.py
|
|
26
33
|
mousetools/mixins/__init__.py
|
|
27
34
|
mousetools/mixins/disney.py
|
|
28
35
|
mousetools/mixins/themeparksapi.py
|
|
29
36
|
tests/test_auth.py
|
|
30
37
|
tests/test_entities.py
|
|
31
|
-
tests/test_entity.py
|
|
32
38
|
tests/test_ids.py
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: MouseTools
|
|
3
|
-
Version: 3.0.0.
|
|
3
|
+
Version: 3.0.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
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
9
9
|
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.9
|
|
10
11
|
Description-Content-Type: text/markdown
|
|
11
12
|
License-File: LICENSE
|
|
12
|
-
Requires-Dist:
|
|
13
|
+
Requires-Dist: httpx>=0.27.2
|
|
14
|
+
Requires-Dist: tzdata>=2024.1
|
|
13
15
|
|
|
14
16
|
# MouseTools
|
|
15
17
|
[](https://badge.fury.io/py/MouseTools) [](https://pepy.tech/project/mousetools)
|
|
@@ -17,7 +19,7 @@ Requires-Dist: requests
|
|
|
17
19
|
|
|
18
20
|
An unofficial Python wrapper for the Disney API. Data is pulled directly from Disney. This package supports Walt Disney World and Disneyland.
|
|
19
21
|
|
|
20
|
-
Read the [documentation](https://caratozzoloxyz.gitlab.io/public/MouseTools/)
|
|
22
|
+
Read the [documentation](https://caratozzoloxyz.gitlab.io/public/MouseTools/).
|
|
21
23
|
|
|
22
24
|
|
|
23
25
|
### Installation
|
|
@@ -30,6 +32,42 @@ You can also install directly from this repo in case of any changes not uploaded
|
|
|
30
32
|
pip install git+https://gitlab.com/caratozzoloxyz/public/MouseTools
|
|
31
33
|
```
|
|
32
34
|
|
|
35
|
+
### Quick Start
|
|
36
|
+
|
|
37
|
+
Define an entity object directly.
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from mousetools.entities import Attraction
|
|
41
|
+
|
|
42
|
+
big_thunder = Attraction("80010110")
|
|
43
|
+
|
|
44
|
+
print(big_thunder.name)
|
|
45
|
+
#> 'Big Thunder Mountain Railroad'
|
|
46
|
+
|
|
47
|
+
print(big_thunder.ancestor_theme_park_id)
|
|
48
|
+
#> '80007944'
|
|
49
|
+
|
|
50
|
+
print(big_thunder.get_status())
|
|
51
|
+
#> 'OPERATING'
|
|
52
|
+
|
|
53
|
+
print(big_thunder.get_wait_time())
|
|
54
|
+
#> 45
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Use the already created destination objects to get children entities.
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
from mousetools.entities import WALT_DISNEY_WORLD_DESTINATION, DISNEYLAND_RESORT_DESTINATION
|
|
62
|
+
from mousetools.ids import FacilityServiceEntityTypes
|
|
63
|
+
|
|
64
|
+
print(WALT_DISNEY_WORLD_DESTINATION.get_children_entity_ids(FacilityServiceEntityTypes.ENTERTAINMENT_VENUES))
|
|
65
|
+
#> ['10460', '80008033', '80008259']
|
|
66
|
+
|
|
67
|
+
print(DISNEYLAND_RESORT_DESTINATION.get_children_entity_ids(FacilityServiceEntityTypes.RESORT_AREAS))
|
|
68
|
+
#> ['330338', '15597760']
|
|
69
|
+
```
|
|
70
|
+
|
|
33
71
|
### License
|
|
34
72
|
This project is distributed under the MIT license. For more information see [LICENSE](https://gitlab.com/caratozzoloxyz/public/MouseTools/-/blob/master/LICENSE?ref_type=heads)
|
|
35
73
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
An unofficial Python wrapper for the Disney API. Data is pulled directly from Disney. This package supports Walt Disney World and Disneyland.
|
|
6
6
|
|
|
7
|
-
Read the [documentation](https://caratozzoloxyz.gitlab.io/public/MouseTools/)
|
|
7
|
+
Read the [documentation](https://caratozzoloxyz.gitlab.io/public/MouseTools/).
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
### Installation
|
|
@@ -17,6 +17,42 @@ You can also install directly from this repo in case of any changes not uploaded
|
|
|
17
17
|
pip install git+https://gitlab.com/caratozzoloxyz/public/MouseTools
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
### Quick Start
|
|
21
|
+
|
|
22
|
+
Define an entity object directly.
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
from mousetools.entities import Attraction
|
|
26
|
+
|
|
27
|
+
big_thunder = Attraction("80010110")
|
|
28
|
+
|
|
29
|
+
print(big_thunder.name)
|
|
30
|
+
#> 'Big Thunder Mountain Railroad'
|
|
31
|
+
|
|
32
|
+
print(big_thunder.ancestor_theme_park_id)
|
|
33
|
+
#> '80007944'
|
|
34
|
+
|
|
35
|
+
print(big_thunder.get_status())
|
|
36
|
+
#> 'OPERATING'
|
|
37
|
+
|
|
38
|
+
print(big_thunder.get_wait_time())
|
|
39
|
+
#> 45
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Use the already created destination objects to get children entities.
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
from mousetools.entities import WALT_DISNEY_WORLD_DESTINATION, DISNEYLAND_RESORT_DESTINATION
|
|
47
|
+
from mousetools.ids import FacilityServiceEntityTypes
|
|
48
|
+
|
|
49
|
+
print(WALT_DISNEY_WORLD_DESTINATION.get_children_entity_ids(FacilityServiceEntityTypes.ENTERTAINMENT_VENUES))
|
|
50
|
+
#> ['10460', '80008033', '80008259']
|
|
51
|
+
|
|
52
|
+
print(DISNEYLAND_RESORT_DESTINATION.get_children_entity_ids(FacilityServiceEntityTypes.RESORT_AREAS))
|
|
53
|
+
#> ['330338', '15597760']
|
|
54
|
+
```
|
|
55
|
+
|
|
20
56
|
### License
|
|
21
57
|
This project is distributed under the MIT license. For more information see [LICENSE](https://gitlab.com/caratozzoloxyz/public/MouseTools/-/blob/master/LICENSE?ref_type=heads)
|
|
22
58
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import typing
|
|
2
|
-
import requests
|
|
3
2
|
from datetime import datetime, timedelta
|
|
4
3
|
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
5
6
|
|
|
6
7
|
class Authentication:
|
|
7
8
|
def __init__(self):
|
|
@@ -26,11 +27,20 @@ class Authentication:
|
|
|
26
27
|
"Proxy-Connection": "keep-alive",
|
|
27
28
|
"Accept-Encoding": "gzip, deflate",
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
|
|
31
|
+
body = {
|
|
32
|
+
"grant_type": "assertion",
|
|
33
|
+
"assertion_type": "public",
|
|
34
|
+
"client_id": "TPR-DLR-LBSDK.AND-PROD",
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
response = httpx.post(
|
|
38
|
+
"https://authorization.go.com/token",
|
|
31
39
|
headers=headers,
|
|
40
|
+
params=body,
|
|
32
41
|
timeout=10,
|
|
33
42
|
)
|
|
43
|
+
response.raise_for_status()
|
|
34
44
|
auth = response.json()
|
|
35
45
|
|
|
36
46
|
return auth["access_token"], int(auth["expires_in"])
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from mousetools.entities.attraction import Attraction
|
|
2
|
+
from mousetools.entities.character import Character
|
|
3
|
+
from mousetools.entities.destination import Destination
|
|
4
|
+
from mousetools.entities.dining_event import DiningEvent
|
|
5
|
+
from mousetools.entities.dinner_show import DinnerShow
|
|
6
|
+
from mousetools.entities.entertainment import Entertainment
|
|
7
|
+
from mousetools.entities.entertainment_venue import EntertainmentVenue
|
|
8
|
+
from mousetools.entities.event import Event
|
|
9
|
+
from mousetools.entities.guest_services import GuestServices
|
|
10
|
+
from mousetools.entities.land import Land
|
|
11
|
+
from mousetools.entities.merchandise_facility import MerchandiseFacility
|
|
12
|
+
from mousetools.entities.park import ThemePark, WaterPark
|
|
13
|
+
from mousetools.entities.point_of_interest import PointOfInterest
|
|
14
|
+
from mousetools.entities.resort import Resort
|
|
15
|
+
from mousetools.entities.resort_area import ResortArea
|
|
16
|
+
from mousetools.entities.restaurant import Restaurant
|
|
17
|
+
from mousetools.ids import DestinationIds
|
|
18
|
+
|
|
19
|
+
WALT_DISNEY_WORLD_DESTINATION = Destination(DestinationIds.WALT_DISNEY_WORLD)
|
|
20
|
+
DISNEYLAND_RESORT_DESTINATION = Destination(DestinationIds.DISNEYLAND_RESORT)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
__all__ = [
|
|
24
|
+
"Attraction",
|
|
25
|
+
"Character",
|
|
26
|
+
"GuestServices",
|
|
27
|
+
"Entertainment",
|
|
28
|
+
"Destination",
|
|
29
|
+
"ThemePark",
|
|
30
|
+
"WaterPark",
|
|
31
|
+
"EntertainmentVenue",
|
|
32
|
+
"MerchandiseFacility",
|
|
33
|
+
"Restaurant",
|
|
34
|
+
"Resort",
|
|
35
|
+
"ResortArea",
|
|
36
|
+
"DiningEvent",
|
|
37
|
+
"DinnerShow",
|
|
38
|
+
"Event",
|
|
39
|
+
"Land",
|
|
40
|
+
"PointOfInterest",
|
|
41
|
+
]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from mousetools.entities.base import EntityBase
|
|
2
|
+
from mousetools.ids import FacilityServiceEntityTypes
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Attraction(EntityBase):
|
|
6
|
+
"""Class for Attraction Entities."""
|
|
7
|
+
|
|
8
|
+
def __init__(self, entity_id: str):
|
|
9
|
+
super().__init__(
|
|
10
|
+
entity_id=entity_id,
|
|
11
|
+
facility_service_entity_type=FacilityServiceEntityTypes.ATTRACTIONS,
|
|
12
|
+
)
|