PyTransportNSWv2 0.8.8__tar.gz → 0.8.10__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.
- {PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/PKG-INFO +3 -2
- {PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/PyTransportNSWv2.egg-info/PKG-INFO +3 -2
- {PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/README.md +2 -1
- {PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/TransportNSWv2/TransportNSWv2.py +4 -5
- {PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/setup.py +1 -1
- {PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/LICENSE +0 -0
- {PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/PyTransportNSWv2.egg-info/SOURCES.txt +0 -0
- {PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/PyTransportNSWv2.egg-info/dependency_links.txt +0 -0
- {PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/PyTransportNSWv2.egg-info/requires.txt +0 -0
- {PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/PyTransportNSWv2.egg-info/top_level.txt +0 -0
- {PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/TransportNSWv2/__init__.py +0 -0
- {PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: PyTransportNSWv2
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.10
|
4
4
|
Summary: Get detailed per-trip transport information from TransportNSW
|
5
5
|
Home-page: https://github.com/andystewart999/TransportNSW
|
6
6
|
Author: andystewart999
|
@@ -24,8 +24,9 @@ Description: # TransportNSWv2
|
|
24
24
|
The source API details can be found here: https://opendata.transport.nsw.gov.au/sites/default/files/2023-08/Trip%20Planner%20API%20manual-opendataproduction%20v3.2.pdf
|
25
25
|
|
26
26
|
### Parameters
|
27
|
+
Only the first three paramters are mandatory, the rest are optional. All parameters and their defaults are as follows:
|
27
28
|
```python
|
28
|
-
.get_trip(origin_stop_id, destination_stop_id, api_key,
|
29
|
+
.get_trip(origin_stop_id, destination_stop_id, api_key, trip_wait_time = 0, transport_type = 0, strict_transport_type = False, raw_output = False, journeys_to_return = 1, route_filter = '', include_realtime_location = True, include_alerts = 'none', alert_type = 'all', check_stop_ids = True, forced_gtfs_uri = [])
|
29
30
|
```
|
30
31
|
|
31
32
|
Transport types:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: PyTransportNSWv2
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.10
|
4
4
|
Summary: Get detailed per-trip transport information from TransportNSW
|
5
5
|
Home-page: https://github.com/andystewart999/TransportNSW
|
6
6
|
Author: andystewart999
|
@@ -24,8 +24,9 @@ Description: # TransportNSWv2
|
|
24
24
|
The source API details can be found here: https://opendata.transport.nsw.gov.au/sites/default/files/2023-08/Trip%20Planner%20API%20manual-opendataproduction%20v3.2.pdf
|
25
25
|
|
26
26
|
### Parameters
|
27
|
+
Only the first three paramters are mandatory, the rest are optional. All parameters and their defaults are as follows:
|
27
28
|
```python
|
28
|
-
.get_trip(origin_stop_id, destination_stop_id, api_key,
|
29
|
+
.get_trip(origin_stop_id, destination_stop_id, api_key, trip_wait_time = 0, transport_type = 0, strict_transport_type = False, raw_output = False, journeys_to_return = 1, route_filter = '', include_realtime_location = True, include_alerts = 'none', alert_type = 'all', check_stop_ids = True, forced_gtfs_uri = [])
|
29
30
|
```
|
30
31
|
|
31
32
|
Transport types:
|
@@ -16,8 +16,9 @@ If it's available, the general occupancy level and the latitude and longitude of
|
|
16
16
|
The source API details can be found here: https://opendata.transport.nsw.gov.au/sites/default/files/2023-08/Trip%20Planner%20API%20manual-opendataproduction%20v3.2.pdf
|
17
17
|
|
18
18
|
### Parameters
|
19
|
+
Only the first three paramters are mandatory, the rest are optional. All parameters and their defaults are as follows:
|
19
20
|
```python
|
20
|
-
.get_trip(origin_stop_id, destination_stop_id, api_key,
|
21
|
+
.get_trip(origin_stop_id, destination_stop_id, api_key, trip_wait_time = 0, transport_type = 0, strict_transport_type = False, raw_output = False, journeys_to_return = 1, route_filter = '', include_realtime_location = True, include_alerts = 'none', alert_type = 'all', check_stop_ids = True, forced_gtfs_uri = [])
|
21
22
|
```
|
22
23
|
|
23
24
|
Transport types:
|
@@ -269,7 +269,7 @@ class TransportNSWv2(object):
|
|
269
269
|
occupancy = first_stop['properties']['occupancy']
|
270
270
|
|
271
271
|
alerts = "[]"
|
272
|
-
if include_alerts != 'none':
|
272
|
+
if self.include_alerts != 'none':
|
273
273
|
# We'll be adding these to the returned JSON string as an array
|
274
274
|
# Only include alerts of the specified priority or greater, and of the specified type
|
275
275
|
alerts = self.find_alerts(legs, self.include_alerts, self.alert_type)
|
@@ -524,14 +524,13 @@ class TransportNSWv2(object):
|
|
524
524
|
|
525
525
|
alert_priorities = {
|
526
526
|
"all" : 0,
|
527
|
-
"
|
527
|
+
"verylow" : 1,
|
528
528
|
"low" : 2,
|
529
529
|
"normal" : 3,
|
530
530
|
"high" : 4,
|
531
|
-
"
|
531
|
+
"veryhigh" : 5
|
532
532
|
}
|
533
|
-
|
534
|
-
return alert_priorities.get(alert_priority, 99)
|
533
|
+
return alert_priorities.get(alert_priority.lower(), 4)
|
535
534
|
|
536
535
|
|
537
536
|
def get_mode_list(self, mode, agencyid):
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
5
5
|
|
6
6
|
setuptools.setup(
|
7
7
|
name="PyTransportNSWv2",
|
8
|
-
version="0.8.
|
8
|
+
version="0.8.10",
|
9
9
|
author="andystewart999",
|
10
10
|
author_email="andy.stewart@live.com",
|
11
11
|
description="Get detailed per-trip transport information from TransportNSW",
|
File without changes
|
File without changes
|
{PyTransportNSWv2-0.8.8 → PyTransportNSWv2-0.8.10}/PyTransportNSWv2.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|