From 626cd5a3ea91073f60a283336cf507d880a7c143 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Tue, 3 Jun 2025 18:40:16 -0500 Subject: [PATCH 01/13] Add API version find/replace results --- src/commands/stops.rs | 6 +++--- src/commands/times.rs | 2 +- tests/fixtures/stops/fetch.sh | 2 +- tests/stops.rs | 20 ++++++++++---------- tests/times.rs | 20 ++++++++++---------- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/commands/stops.rs b/src/commands/stops.rs index eedced4..76bd1b5 100644 --- a/src/commands/stops.rs +++ b/src/commands/stops.rs @@ -14,7 +14,7 @@ pub async fn handle_stops_request( maybe_incoming_message_id: Option, db: &PgPool, ) -> Result> { - let locations_query = format!("/v3/locations:{}.json?usage=short", command.location); + let locations_query = format!("/v4/locations:{}.json?usage=short", command.location); log::trace!("locations URL: {}", locations_query); let (_locations_response_status, locations_response_text) = fetch_from_odws( @@ -33,7 +33,7 @@ pub async fn handle_stops_request( }; let stops_query = format!( - "/v3/stops.json?lat={}&lon={}&distance={}&usage=short", + "/v4/stops.json?lat={}&lon={}&distance={}&usage=short", latitude, longitude, STOPS_DISTANCE ); @@ -68,7 +68,7 @@ pub async fn handle_stops_request( let mut response = format!("Stops near {}\n", location_name); for stop in stops_response.stops.iter().take(MAXIMUM_STOPS_TO_RETURN) { - let routes_query = format!("/v3/routes.json?stop={}", stop.number); + let routes_query = format!("/v4/routes.json?stop={}", stop.number); log::trace!("routes URL: {}", routes_query); diff --git a/src/commands/times.rs b/src/commands/times.rs index 0a5556a..b74de60 100644 --- a/src/commands/times.rs +++ b/src/commands/times.rs @@ -18,7 +18,7 @@ pub async fn handle_times_request( number: &Option, ) -> Result> { let query = format!( - "/v3/stops/{}/schedule.json?usage=short", + "/v4/stops/{}/schedule.json?usage=short", command.stop_number, ); diff --git a/tests/fixtures/stops/fetch.sh b/tests/fixtures/stops/fetch.sh index d960a52..6db71d7 100755 --- a/tests/fixtures/stops/fetch.sh +++ b/tests/fixtures/stops/fetch.sh @@ -4,5 +4,5 @@ STOP_NUMBERS=(10625 10641 11052 11010 10642 10901 10902 10624 10830 10590 10907 for STOP_NUMBER in "${STOP_NUMBERS[@]}" do - curl -o "routes/stop_${STOP_NUMBER}.json" "https://api.winnipegtransit.com/v3/routes.json?api-key=${API_KEY}&stop=${STOP_NUMBER}" + curl -o "routes/stop_${STOP_NUMBER}.json" "https://api.winnipegtransit.com/v4/routes.json?api-key=${API_KEY}&stop=${STOP_NUMBER}" done \ No newline at end of file diff --git a/tests/stops.rs b/tests/stops.rs index 9d444ce..a4e54db 100644 --- a/tests/stops.rs +++ b/tests/stops.rs @@ -22,7 +22,7 @@ async fn stops_returns_stops_and_routes_near_a_location(db: PgPool) { .expect("Failed to read locations fixture"); Mock::given(method("GET")) - .and(path_regex(r"^/v3/locations:.*\.json$")) + .and(path_regex(r"^/v4/locations:.*\.json$")) .and(query_param("usage", "short")) .respond_with(ResponseTemplate::new(200).set_body_string(mock_locations_response.clone())) .expect(1) @@ -34,7 +34,7 @@ async fn stops_returns_stops_and_routes_near_a_location(db: PgPool) { .expect("Failed to read stops fixture"); Mock::given(method("GET")) - .and(path_regex(r"^/v3/stops.json$")) + .and(path_regex(r"^/v4/stops.json$")) .and(query_param("lat", "49.88895")) .and(query_param("lon", "-97.13424")) .and(query_param("distance", "500")) @@ -58,7 +58,7 @@ async fn stops_returns_stops_and_routes_near_a_location(db: PgPool) { )) .unwrap_or_else(|_| panic!("Failed to read routes fixture for stop {}", stop_key)); - let mock_route_path = format!("/v3/routes.json?stop={}", stop_key); + let mock_route_path = format!("/v4/routes.json?stop={}", stop_key); mock_routes.push(( mock_route_path.clone(), mock_routes_response.clone(), @@ -66,7 +66,7 @@ async fn stops_returns_stops_and_routes_near_a_location(db: PgPool) { )); Mock::given(method("GET")) - .and(path("/v3/routes.json")) + .and(path("/v4/routes.json")) .and(query_param("stop", stop_key.as_str())) .respond_with(ResponseTemplate::new(200).set_body_string(mock_routes_response)) .expect(1) @@ -146,7 +146,7 @@ async fn stops_returns_stops_and_routes_near_a_location(db: PgPool) { assert_eq!(locations_response.body, mock_locations_response); assert_eq!( locations_response.query, - format!("/v3/locations:Union Station.json?usage=short") + format!("/v4/locations:Union Station.json?usage=short") ); let stops_response = api_responses @@ -157,7 +157,7 @@ async fn stops_returns_stops_and_routes_near_a_location(db: PgPool) { assert_eq!(stops_response.body, mock_stops_response); assert_eq!( stops_response.query, - format!("/v3/stops.json?lat=49.88895&lon=-97.13424&distance=500&usage=short") + format!("/v4/stops.json?lat=49.88895&lon=-97.13424&distance=500&usage=short") ); let routes_responses: Vec<&ApiResponse> = api_responses.iter().skip(2).collect(); @@ -181,7 +181,7 @@ async fn stops_handles_an_empty_locations_response(db: PgPool) { .expect("Failed to read locations fixture"); Mock::given(method("GET")) - .and(path_regex(r"^/v3/locations:.*\.json$")) + .and(path_regex(r"^/v4/locations:.*\.json$")) .and(query_param("usage", "short")) .respond_with(ResponseTemplate::new(200).set_body_string(mock_locations_response.clone())) .expect(1) @@ -221,7 +221,7 @@ async fn stops_handles_an_empty_locations_response(db: PgPool) { .expect("Failed to fetch API response"); assert_eq!(api_response.body, mock_locations_response); - assert_eq!(api_response.query, "/v3/locations:acab.json?usage=short"); + assert_eq!(api_response.query, "/v4/locations:acab.json?usage=short"); } #[sqlx::test(fixtures("numbers-approved"))] @@ -233,7 +233,7 @@ async fn stops_handles_an_empty_stops_response(db: PgPool) { .expect("Failed to read locations fixture"); Mock::given(method("GET")) - .and(path_regex(r"^/v3/locations:.*\.json$")) + .and(path_regex(r"^/v4/locations:.*\.json$")) .and(query_param("usage", "short")) .respond_with(ResponseTemplate::new(200).set_body_string(mock_locations_response.clone())) .expect(1) @@ -245,7 +245,7 @@ async fn stops_handles_an_empty_stops_response(db: PgPool) { .expect("Failed to read stops fixture"); Mock::given(method("GET")) - .and(path_regex(r"^/v3/stops.json$")) + .and(path_regex(r"^/v4/stops.json$")) .respond_with(ResponseTemplate::new(200).set_body_string(mock_stops_response.clone())) .expect(1) .named("stops") diff --git a/tests/times.rs b/tests/times.rs index bdbba95..f228567 100644 --- a/tests/times.rs +++ b/tests/times.rs @@ -21,7 +21,7 @@ async fn stop_number_returns_stop_schedule(db: PgPool) { .expect("Failed to read stop schedule fixture"); Mock::given(method("GET")) - .and(path_regex(r"^/v3/stops/.*/schedule.json$")) + .and(path_regex(r"^/v4/stops/.*/schedule.json$")) .respond_with( ResponseTemplate::new(200).set_body_string(mock_stop_schedule_response.clone()), ) @@ -86,7 +86,7 @@ async fn stop_number_returns_stop_schedule(db: PgPool) { assert_eq!(api_response.body, mock_stop_schedule_response); assert_eq!( api_response.query, - "/v3/stops/10619/schedule.json?usage=short" + "/v4/stops/10619/schedule.json?usage=short" ); } @@ -97,7 +97,7 @@ async fn stop_number_returns_stop_schedule_in_24h_clock_when_number_prefers(db: .expect("Failed to read stop schedule fixture"); Mock::given(method("GET")) - .and(path_regex(r"^/v3/stops/.*/schedule.json$")) + .and(path_regex(r"^/v4/stops/.*/schedule.json$")) .respond_with( ResponseTemplate::new(200).set_body_string(mock_stop_schedule_response.clone()), ) @@ -140,7 +140,7 @@ async fn stop_number_returns_single_route_stop_schedule_to_approved_number(db: P .expect("Failed to read stop schedule fixture"); Mock::given(method("GET")) - .and(path_regex(r"^/v3/stops/.*/schedule.json$")) + .and(path_regex(r"^/v4/stops/.*/schedule.json$")) .respond_with( ResponseTemplate::new(200).set_body_string(mock_stop_schedule_response.clone()), ) @@ -194,7 +194,7 @@ async fn stop_number_returns_single_route_stop_schedule_to_approved_number(db: P assert_eq!(api_response.body, mock_stop_schedule_response); assert_eq!( api_response.query, - "/v3/stops/10619/schedule.json?usage=short" + "/v4/stops/10619/schedule.json?usage=short" ); } @@ -203,7 +203,7 @@ async fn incorrect_stop_number_returns_error(db: PgPool) { let mock_winnipeg_transit_api = MockServer::start().await; Mock::given(method("GET")) - .and(path_regex(r"^/v3/stops/.*/schedule.json$")) + .and(path_regex(r"^/v4/stops/.*/schedule.json$")) .respond_with(ResponseTemplate::new(400).set_body_string("Not found")) .expect(1) .mount(&mock_winnipeg_transit_api) @@ -249,7 +249,7 @@ async fn incorrect_stop_number_returns_error(db: PgPool) { assert_eq!(api_response.body, "Not found"); assert_eq!( api_response.query, - "/v3/stops/10619/schedule.json?usage=short" + "/v4/stops/10619/schedule.json?usage=short" ); } @@ -260,7 +260,7 @@ async fn stop_number_returns_stop_schedule_via_raw_endpoint(db: PgPool) { .expect("Failed to read stop schedule fixture"); Mock::given(method("GET")) - .and(path_regex(r"^/v3/stops/.*/schedule.json$")) + .and(path_regex(r"^/v4/stops/.*/schedule.json$")) .respond_with( ResponseTemplate::new(200).set_body_string(mock_stop_schedule_response.clone()), ) @@ -327,7 +327,7 @@ async fn stop_number_returns_stop_schedule_via_raw_endpoint(db: PgPool) { assert_eq!(api_response.body, mock_stop_schedule_response); assert_eq!( api_response.query, - "/v3/stops/10619/schedule.json?usage=short" + "/v4/stops/10619/schedule.json?usage=short" ); } @@ -339,7 +339,7 @@ async fn stop_number_returns_stop_schedule_issue_10(db: PgPool) { .expect("Failed to read stop schedule fixture"); Mock::given(method("GET")) - .and(path_regex(r"^/v3/stops/.*/schedule.json$")) + .and(path_regex(r"^/v4/stops/.*/schedule.json$")) .respond_with( ResponseTemplate::new(200).set_body_string(mock_stop_schedule_response.clone()), ) From b0420424dc3c8e9711df63948b6e447d3bdbef45 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Tue, 3 Jun 2025 18:52:45 -0500 Subject: [PATCH 02/13] Update stop routes fixtures --- tests/fixtures/stops/fetch.sh | 2 +- tests/fixtures/stops/routes/stop_10157.json | 100 ++++---- tests/fixtures/stops/routes/stop_10158.json | 127 +++++----- tests/fixtures/stops/routes/stop_10588.json | 36 +-- tests/fixtures/stops/routes/stop_10589.json | 76 +++--- tests/fixtures/stops/routes/stop_10590.json | 76 +++--- tests/fixtures/stops/routes/stop_10591.json | 36 +-- tests/fixtures/stops/routes/stop_10620.json | 143 +++++++----- tests/fixtures/stops/routes/stop_10624.json | 187 ++++++++------- tests/fixtures/stops/routes/stop_10625.json | 187 ++++++++------- tests/fixtures/stops/routes/stop_10639.json | 215 +++++++++-------- tests/fixtures/stops/routes/stop_10641.json | 235 ++++++++++++------- tests/fixtures/stops/routes/stop_10642.json | 247 +------------------- tests/fixtures/stops/routes/stop_10651.json | 42 ++-- tests/fixtures/stops/routes/stop_10652.json | 42 ++-- tests/fixtures/stops/routes/stop_10672.json | 42 ++-- tests/fixtures/stops/routes/stop_10675.json | 2 +- tests/fixtures/stops/routes/stop_10803.json | 80 ++++--- tests/fixtures/stops/routes/stop_10804.json | 80 ++++--- tests/fixtures/stops/routes/stop_10830.json | 4 +- tests/fixtures/stops/routes/stop_10901.json | 4 +- tests/fixtures/stops/routes/stop_10902.json | 4 +- tests/fixtures/stops/routes/stop_10907.json | 4 +- tests/fixtures/stops/routes/stop_10939.json | 4 +- tests/fixtures/stops/routes/stop_11010.json | 4 +- tests/fixtures/stops/routes/stop_11024.json | 4 +- tests/fixtures/stops/routes/stop_11051.json | 36 +-- tests/fixtures/stops/routes/stop_11052.json | 55 +++-- 28 files changed, 1048 insertions(+), 1026 deletions(-) diff --git a/tests/fixtures/stops/fetch.sh b/tests/fixtures/stops/fetch.sh index 6db71d7..5986562 100755 --- a/tests/fixtures/stops/fetch.sh +++ b/tests/fixtures/stops/fetch.sh @@ -4,5 +4,5 @@ STOP_NUMBERS=(10625 10641 11052 11010 10642 10901 10902 10624 10830 10590 10907 for STOP_NUMBER in "${STOP_NUMBERS[@]}" do - curl -o "routes/stop_${STOP_NUMBER}.json" "https://api.winnipegtransit.com/v4/routes.json?api-key=${API_KEY}&stop=${STOP_NUMBER}" + curl -o "routes/stop_${STOP_NUMBER}.json" "https://api.winnipegtransit.com/v4/routes.json?api-key=${API_KEY}&stop=${STOP_NUMBER}&effective-on=$(date +%Y-%m-%d)" done \ No newline at end of file diff --git a/tests/fixtures/stops/routes/stop_10157.json b/tests/fixtures/stops/routes/stop_10157.json index eecfc65..368dad5 100644 --- a/tests/fixtures/stops/routes/stop_10157.json +++ b/tests/fixtures/stops/routes/stop_10157.json @@ -1,9 +1,31 @@ { "routes": [ + { + "key": "BLUE", + "number": "BLUE", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "rapid transit", + "badge-label": "B", + "badge-style": { + "class-names": { "class-name": ["badge-label", "rapid-transit"] }, + "background-color": "#0060a9", + "border-color": "#0060a9", + "color": "#ffffff" + }, + "variants": [ + { "key": "BLUE-1-D" }, + { "key": "BLUE-0-U" }, + { "key": "BLUE-0-S" } + ] + }, { "key": 68, "number": 68, "name": "Route 68 Grosvenor", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 68, @@ -14,35 +36,34 @@ "color": "#000000" }, "variants": [ - { "key": "68-1-D" }, { "key": "68-0-R" }, - { "key": "68-1-#" } + { "key": "68-1-#" }, + { "key": "68-1-D" } ] }, { - "key": 47, - "number": 47, - "name": "Route 47 Transcona - Pembina", + "key": 65, + "number": 65, + "name": "Route 65 Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 47, + "coverage": "express", + "badge-label": 65, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", "color": "#000000" }, - "variants": [ - { "key": "47-0-K" }, - { "key": "47-0-R" }, - { "key": "47-1-U" }, - { "key": "47-1-#" } - ] + "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] }, { "key": 66, "number": 66, "name": "Route 66 Grant", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 66, @@ -53,46 +74,35 @@ "color": "#000000" }, "variants": [ - { "key": "66-0-C" }, - { "key": "66-1-K" }, { "key": "66-1-D" }, { "key": "66-0-P" }, - { "key": "66-0-U" } + { "key": "66-1-K" }, + { "key": "66-0-U" }, + { "key": "66-0-C" } ] }, { - "key": 65, - "number": 65, - "name": "Route 65 Grant Express", + "key": 47, + "number": 47, + "name": "Route 47 Transcona - Pembina", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "express", - "badge-label": 65, + "coverage": "regular", + "badge-label": 47, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "65-0-R" }, { "key": "65-1-D" }] - }, - { - "key": "BLUE", - "number": "BLUE", - "customer-type": "regular", - "coverage": "rapid transit", - "badge-label": "B", - "badge-style": { - "class-names": { "class-name": ["badge-label", "rapid-transit"] }, - "background-color": "#0060a9", - "border-color": "#0060a9", - "color": "#ffffff" - }, "variants": [ - { "key": "BLUE-0-S" }, - { "key": "BLUE-0-U" }, - { "key": "BLUE-1-D" } + { "key": "47-1-#" }, + { "key": "47-0-K" }, + { "key": "47-1-U" }, + { "key": "47-0-R" } ] } ], - "query-time": "2024-01-11T20:14:11" + "query-time": "2025-06-03T18:51:01" } diff --git a/tests/fixtures/stops/routes/stop_10158.json b/tests/fixtures/stops/routes/stop_10158.json index 4a73b73..ab476a2 100644 --- a/tests/fixtures/stops/routes/stop_10158.json +++ b/tests/fixtures/stops/routes/stop_10158.json @@ -1,32 +1,28 @@ { "routes": [ { - "key": 19, - "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "key": 53, + "number": 53, + "name": "Route 53 Norwood", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 19, + "badge-label": 53, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [ - { "key": "19-0-N" }, - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-0-#" }, - { "key": "19-1-N" } - ] + "variants": [{ "key": "53-1-D" }, { "key": "53-0-N" }] }, { "key": 54, "number": 54, "name": "Route 54 St. Mary's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", "badge-label": 54, @@ -37,30 +33,62 @@ "color": "#000000" }, "variants": [ - { "key": "54-0-A" }, { "key": "54-1-D" }, + { "key": "54-0-A" }, { "key": "54-0-S" } ] }, { - "key": 57, - "number": 57, - "name": "Route 57 Southdale Express", + "key": 55, + "number": 55, + "name": "Route 55 St. Anne's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "regular", + "badge-label": 55, + "badge-style": { + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", + "color": "#000000" + }, + "variants": [ + { "key": "55-1-D" }, + { "key": "55-0-M" }, + { "key": "55-1-M" }, + { "key": "55-1-##" }, + { "key": "55-1-*" }, + { "key": "55-0-D" } + ] + }, + { + "key": 59, + "number": 59, + "name": "Route 59 South St. Anne's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", - "badge-label": 57, + "badge-label": 59, "badge-style": { "class-names": { "class-name": ["badge-label", "express"] }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "57-0-S" }, { "key": "57-1-D" }] + "variants": [ + { "key": "59-0-I" }, + { "key": "59-0-A" }, + { "key": "59-1-D" } + ] }, { "key": 14, "number": 14, "name": "Route 14 Ellice-St. Mary's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 14, @@ -71,53 +99,38 @@ "color": "#000000" }, "variants": [ - { "key": "14-0-P" }, { "key": "14-0-D" }, { "key": "14-1-E" }, - { "key": "14-1-##" } + { "key": "14-1-##" }, + { "key": "14-0-P" } ] }, { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", - "customer-type": "regular", - "coverage": "regular", - "badge-label": 53, - "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" - }, - "variants": [{ "key": "53-0-N" }, { "key": "53-1-D" }] - }, - { - "key": 59, - "number": 59, - "name": "Route 59 South St. Anne's Express", + "key": 57, + "number": 57, + "name": "Route 57 Southdale Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", - "badge-label": 59, + "badge-label": 57, "badge-style": { "class-names": { "class-name": ["badge-label", "express"] }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [ - { "key": "59-0-I" }, - { "key": "59-1-D" }, - { "key": "59-0-A" } - ] + "variants": [{ "key": "57-1-D" }, { "key": "57-0-S" }] }, { - "key": 55, - "number": 55, - "name": "Route 55 St. Anne's", + "key": 19, + "number": 19, + "name": "Route 19 Marion-Logan-Notre Dame", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 55, + "badge-label": 19, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -125,14 +138,16 @@ "color": "#000000" }, "variants": [ - { "key": "55-0-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-D" }, - { "key": "55-1-*" } + { "key": "19-1-A" }, + { "key": "19-0-L" }, + { "key": "19-0-E" }, + { "key": "19-1-D" }, + { "key": "19-1-N" }, + { "key": "19-0-N" }, + { "key": "19-0-#" }, + { "key": "19-1-#" } ] } ], - "query-time": "2024-01-11T20:14:08" + "query-time": "2025-06-03T18:50:59" } diff --git a/tests/fixtures/stops/routes/stop_10588.json b/tests/fixtures/stops/routes/stop_10588.json index 916a452..71d3e1d 100644 --- a/tests/fixtures/stops/routes/stop_10588.json +++ b/tests/fixtures/stops/routes/stop_10588.json @@ -1,24 +1,11 @@ { "routes": [ - { - "key": 23, - "number": 23, - "name": "Route 23 Broadway - William", - "customer-type": "regular", - "coverage": "regular", - "badge-label": 23, - "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" - }, - "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] - }, { "key": 34, "number": 34, "name": "Route 34 McPhillips Super Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "super express", "badge-label": 34, @@ -29,7 +16,24 @@ "color": "#000000" }, "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + }, + { + "key": 23, + "number": 23, + "name": "Route 23 Broadway - William", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "regular", + "badge-label": 23, + "badge-style": { + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", + "color": "#000000" + }, + "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] } ], - "query-time": "2024-01-11T20:14:09" + "query-time": "2025-06-03T18:51:00" } diff --git a/tests/fixtures/stops/routes/stop_10589.json b/tests/fixtures/stops/routes/stop_10589.json index bdcd940..fdc10de 100644 --- a/tests/fixtures/stops/routes/stop_10589.json +++ b/tests/fixtures/stops/routes/stop_10589.json @@ -1,9 +1,28 @@ { "routes": [ + { + "key": 34, + "number": 34, + "name": "Route 34 McPhillips Super Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "super express", + "badge-label": 34, + "badge-style": { + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", + "color": "#000000" + }, + "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + }, { "key": 23, "number": 23, "name": "Route 23 Broadway - William", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 23, @@ -15,10 +34,29 @@ }, "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] }, + { + "key": 65, + "number": 65, + "name": "Route 65 Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "express", + "badge-label": 65, + "badge-style": { + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", + "color": "#000000" + }, + "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + }, { "key": 66, "number": 66, "name": "Route 66 Grant", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 66, @@ -29,43 +67,13 @@ "color": "#000000" }, "variants": [ - { "key": "66-0-C" }, - { "key": "66-1-K" }, { "key": "66-1-D" }, { "key": "66-0-P" }, - { "key": "66-0-U" } + { "key": "66-1-K" }, + { "key": "66-0-U" }, + { "key": "66-0-C" } ] - }, - { - "key": 34, - "number": 34, - "name": "Route 34 McPhillips Super Express", - "customer-type": "regular", - "coverage": "super express", - "badge-label": 34, - "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", - "color": "#000000" - }, - "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] - }, - { - "key": 65, - "number": 65, - "name": "Route 65 Grant Express", - "customer-type": "regular", - "coverage": "express", - "badge-label": 65, - "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", - "color": "#000000" - }, - "variants": [{ "key": "65-0-R" }, { "key": "65-1-D" }] } ], - "query-time": "2024-01-11T20:14:05" + "query-time": "2025-06-03T18:50:54" } diff --git a/tests/fixtures/stops/routes/stop_10590.json b/tests/fixtures/stops/routes/stop_10590.json index acf635f..407cc01 100644 --- a/tests/fixtures/stops/routes/stop_10590.json +++ b/tests/fixtures/stops/routes/stop_10590.json @@ -1,9 +1,28 @@ { "routes": [ + { + "key": 34, + "number": 34, + "name": "Route 34 McPhillips Super Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "super express", + "badge-label": 34, + "badge-style": { + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", + "color": "#000000" + }, + "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + }, { "key": 23, "number": 23, "name": "Route 23 Broadway - William", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 23, @@ -15,10 +34,29 @@ }, "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] }, + { + "key": 65, + "number": 65, + "name": "Route 65 Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "express", + "badge-label": 65, + "badge-style": { + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", + "color": "#000000" + }, + "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + }, { "key": 66, "number": 66, "name": "Route 66 Grant", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 66, @@ -29,43 +67,13 @@ "color": "#000000" }, "variants": [ - { "key": "66-0-C" }, - { "key": "66-1-K" }, { "key": "66-1-D" }, { "key": "66-0-P" }, - { "key": "66-0-U" } + { "key": "66-1-K" }, + { "key": "66-0-U" }, + { "key": "66-0-C" } ] - }, - { - "key": 34, - "number": 34, - "name": "Route 34 McPhillips Super Express", - "customer-type": "regular", - "coverage": "super express", - "badge-label": 34, - "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", - "color": "#000000" - }, - "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] - }, - { - "key": 65, - "number": 65, - "name": "Route 65 Grant Express", - "customer-type": "regular", - "coverage": "express", - "badge-label": 65, - "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", - "color": "#000000" - }, - "variants": [{ "key": "65-0-R" }, { "key": "65-1-D" }] } ], - "query-time": "2024-01-11T20:14:03" + "query-time": "2025-06-03T18:50:52" } diff --git a/tests/fixtures/stops/routes/stop_10591.json b/tests/fixtures/stops/routes/stop_10591.json index d51b34a..13a2ef7 100644 --- a/tests/fixtures/stops/routes/stop_10591.json +++ b/tests/fixtures/stops/routes/stop_10591.json @@ -1,24 +1,11 @@ { "routes": [ - { - "key": 23, - "number": 23, - "name": "Route 23 Broadway - William", - "customer-type": "regular", - "coverage": "regular", - "badge-label": 23, - "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" - }, - "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] - }, { "key": 34, "number": 34, "name": "Route 34 McPhillips Super Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "super express", "badge-label": 34, @@ -29,7 +16,24 @@ "color": "#000000" }, "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + }, + { + "key": 23, + "number": 23, + "name": "Route 23 Broadway - William", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "regular", + "badge-label": 23, + "badge-style": { + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", + "color": "#000000" + }, + "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] } ], - "query-time": "2024-01-11T20:14:08" + "query-time": "2025-06-03T18:50:58" } diff --git a/tests/fixtures/stops/routes/stop_10620.json b/tests/fixtures/stops/routes/stop_10620.json index f707fff..07ee547 100644 --- a/tests/fixtures/stops/routes/stop_10620.json +++ b/tests/fixtures/stops/routes/stop_10620.json @@ -1,35 +1,35 @@ { "routes": [ { - "key": 19, - "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "key": 54, + "number": 54, + "name": "Route 54 St. Mary's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 19, + "coverage": "express", + "badge-label": 54, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "19-0-N" }, - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-0-#" }, - { "key": "19-1-N" } + { "key": "54-1-D" }, + { "key": "54-0-A" }, + { "key": "54-0-S" } ] }, { - "key": 68, - "number": 68, - "name": "Route 68 Grosvenor", + "key": 55, + "number": 55, + "name": "Route 55 St. Anne's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 68, + "badge-label": 55, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -37,18 +37,23 @@ "color": "#000000" }, "variants": [ - { "key": "68-1-D" }, - { "key": "68-0-R" }, - { "key": "68-1-#" } + { "key": "55-1-D" }, + { "key": "55-0-M" }, + { "key": "55-1-M" }, + { "key": "55-1-##" }, + { "key": "55-1-*" }, + { "key": "55-0-D" } ] }, { - "key": 54, - "number": 54, - "name": "Route 54 St. Mary's Express", + "key": 59, + "number": 59, + "name": "Route 59 South St. Anne's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", - "badge-label": 54, + "badge-label": 59, "badge-style": { "class-names": { "class-name": ["badge-label", "express"] }, "background-color": "#eed700", @@ -56,30 +61,17 @@ "color": "#000000" }, "variants": [ - { "key": "54-0-A" }, - { "key": "54-1-D" }, - { "key": "54-0-S" } + { "key": "59-0-I" }, + { "key": "59-0-A" }, + { "key": "59-1-D" } ] }, - { - "key": 57, - "number": 57, - "name": "Route 57 Southdale Express", - "customer-type": "regular", - "coverage": "express", - "badge-label": 57, - "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", - "color": "#000000" - }, - "variants": [{ "key": "57-0-S" }, { "key": "57-1-D" }] - }, { "key": 14, "number": 14, "name": "Route 14 Ellice-St. Mary's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 14, @@ -90,38 +82,59 @@ "color": "#000000" }, "variants": [ - { "key": "14-0-P" }, { "key": "14-0-D" }, { "key": "14-1-E" }, - { "key": "14-1-##" } + { "key": "14-1-##" }, + { "key": "14-0-P" } ] }, { - "key": 59, - "number": 59, - "name": "Route 59 South St. Anne's Express", + "key": 57, + "number": 57, + "name": "Route 57 Southdale Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", - "badge-label": 59, + "badge-label": 57, "badge-style": { "class-names": { "class-name": ["badge-label", "express"] }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, + "variants": [{ "key": "57-1-D" }, { "key": "57-0-S" }] + }, + { + "key": 68, + "number": 68, + "name": "Route 68 Grosvenor", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "regular", + "badge-label": 68, + "badge-style": { + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", + "color": "#000000" + }, "variants": [ - { "key": "59-0-I" }, - { "key": "59-1-D" }, - { "key": "59-0-A" } + { "key": "68-0-R" }, + { "key": "68-1-#" }, + { "key": "68-1-D" } ] }, { - "key": 55, - "number": 55, - "name": "Route 55 St. Anne's", + "key": 19, + "number": 19, + "name": "Route 19 Marion-Logan-Notre Dame", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 55, + "badge-label": 19, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -129,14 +142,16 @@ "color": "#000000" }, "variants": [ - { "key": "55-0-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-D" }, - { "key": "55-1-*" } + { "key": "19-1-A" }, + { "key": "19-0-L" }, + { "key": "19-0-E" }, + { "key": "19-1-D" }, + { "key": "19-1-N" }, + { "key": "19-0-N" }, + { "key": "19-0-#" }, + { "key": "19-1-#" } ] } ], - "query-time": "2024-01-11T20:14:06" + "query-time": "2025-06-03T18:50:56" } diff --git a/tests/fixtures/stops/routes/stop_10624.json b/tests/fixtures/stops/routes/stop_10624.json index 7955948..afee42a 100644 --- a/tests/fixtures/stops/routes/stop_10624.json +++ b/tests/fixtures/stops/routes/stop_10624.json @@ -1,51 +1,48 @@ { "routes": [ { - "key": 19, - "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "key": "BLUE", + "number": "BLUE", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 19, + "coverage": "rapid transit", + "badge-label": "B", "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" + "class-names": { "class-name": ["badge-label", "rapid-transit"] }, + "background-color": "#0060a9", + "border-color": "#0060a9", + "color": "#ffffff" }, "variants": [ - { "key": "19-0-N" }, - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-0-#" }, - { "key": "19-1-N" } + { "key": "BLUE-1-D" }, + { "key": "BLUE-0-U" }, + { "key": "BLUE-0-S" } ] }, { - "key": 68, - "number": 68, - "name": "Route 68 Grosvenor", + "key": 53, + "number": 53, + "name": "Route 53 Norwood", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 68, + "badge-label": 53, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [ - { "key": "68-1-D" }, - { "key": "68-0-R" }, - { "key": "68-1-#" } - ] + "variants": [{ "key": "53-1-D" }, { "key": "53-0-N" }] }, { "key": 54, "number": 54, "name": "Route 54 St. Mary's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", "badge-label": 54, @@ -56,18 +53,20 @@ "color": "#000000" }, "variants": [ - { "key": "54-0-A" }, { "key": "54-1-D" }, + { "key": "54-0-A" }, { "key": "54-0-S" } ] }, { - "key": 47, - "number": 47, - "name": "Route 47 Transcona - Pembina", + "key": 55, + "number": 55, + "name": "Route 55 St. Anne's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 47, + "badge-label": 55, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -75,31 +74,41 @@ "color": "#000000" }, "variants": [ - { "key": "47-0-K" }, - { "key": "47-0-R" }, - { "key": "47-1-U" }, - { "key": "47-1-#" } + { "key": "55-1-D" }, + { "key": "55-0-M" }, + { "key": "55-1-M" }, + { "key": "55-1-##" }, + { "key": "55-1-*" }, + { "key": "55-0-D" } ] }, { - "key": 57, - "number": 57, - "name": "Route 57 Southdale Express", + "key": 59, + "number": 59, + "name": "Route 59 South St. Anne's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", - "badge-label": 57, + "badge-label": 59, "badge-style": { "class-names": { "class-name": ["badge-label", "express"] }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "57-0-S" }, { "key": "57-1-D" }] + "variants": [ + { "key": "59-0-I" }, + { "key": "59-0-A" }, + { "key": "59-1-D" } + ] }, { "key": 14, "number": 14, "name": "Route 14 Ellice-St. Mary's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 14, @@ -110,53 +119,59 @@ "color": "#000000" }, "variants": [ - { "key": "14-0-P" }, { "key": "14-0-D" }, { "key": "14-1-E" }, - { "key": "14-1-##" } + { "key": "14-1-##" }, + { "key": "14-0-P" } ] }, { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", + "key": 57, + "number": 57, + "name": "Route 57 Southdale Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 53, + "coverage": "express", + "badge-label": 57, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "53-0-N" }, { "key": "53-1-D" }] + "variants": [{ "key": "57-1-D" }, { "key": "57-0-S" }] }, { - "key": 59, - "number": 59, - "name": "Route 59 South St. Anne's Express", + "key": 68, + "number": 68, + "name": "Route 68 Grosvenor", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "express", - "badge-label": 59, + "coverage": "regular", + "badge-label": 68, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "59-0-I" }, - { "key": "59-1-D" }, - { "key": "59-0-A" } + { "key": "68-0-R" }, + { "key": "68-1-#" }, + { "key": "68-1-D" } ] }, { - "key": 55, - "number": 55, - "name": "Route 55 St. Anne's", + "key": 19, + "number": 19, + "name": "Route 19 Marion-Logan-Notre Dame", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 55, + "badge-label": 19, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -164,32 +179,38 @@ "color": "#000000" }, "variants": [ - { "key": "55-0-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-D" }, - { "key": "55-1-*" } + { "key": "19-1-A" }, + { "key": "19-0-L" }, + { "key": "19-0-E" }, + { "key": "19-1-D" }, + { "key": "19-1-N" }, + { "key": "19-0-N" }, + { "key": "19-0-#" }, + { "key": "19-1-#" } ] }, { - "key": "BLUE", - "number": "BLUE", + "key": 47, + "number": 47, + "name": "Route 47 Transcona - Pembina", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "rapid transit", - "badge-label": "B", + "coverage": "regular", + "badge-label": 47, "badge-style": { - "class-names": { "class-name": ["badge-label", "rapid-transit"] }, - "background-color": "#0060a9", - "border-color": "#0060a9", - "color": "#ffffff" + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", + "color": "#000000" }, "variants": [ - { "key": "BLUE-0-S" }, - { "key": "BLUE-0-U" }, - { "key": "BLUE-1-D" } + { "key": "47-1-#" }, + { "key": "47-0-K" }, + { "key": "47-1-U" }, + { "key": "47-0-R" } ] } ], - "query-time": "2024-01-11T20:14:02" + "query-time": "2025-06-03T18:50:51" } diff --git a/tests/fixtures/stops/routes/stop_10625.json b/tests/fixtures/stops/routes/stop_10625.json index 329c296..35f84e0 100644 --- a/tests/fixtures/stops/routes/stop_10625.json +++ b/tests/fixtures/stops/routes/stop_10625.json @@ -1,51 +1,48 @@ { "routes": [ { - "key": 19, - "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "key": "BLUE", + "number": "BLUE", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 19, + "coverage": "rapid transit", + "badge-label": "B", "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" + "class-names": { "class-name": ["badge-label", "rapid-transit"] }, + "background-color": "#0060a9", + "border-color": "#0060a9", + "color": "#ffffff" }, "variants": [ - { "key": "19-0-N" }, - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-0-#" }, - { "key": "19-1-N" } + { "key": "BLUE-1-D" }, + { "key": "BLUE-0-U" }, + { "key": "BLUE-0-S" } ] }, { - "key": 68, - "number": 68, - "name": "Route 68 Grosvenor", + "key": 53, + "number": 53, + "name": "Route 53 Norwood", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 68, + "badge-label": 53, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [ - { "key": "68-1-D" }, - { "key": "68-0-R" }, - { "key": "68-1-#" } - ] + "variants": [{ "key": "53-1-D" }, { "key": "53-0-N" }] }, { "key": 54, "number": 54, "name": "Route 54 St. Mary's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", "badge-label": 54, @@ -56,18 +53,20 @@ "color": "#000000" }, "variants": [ - { "key": "54-0-A" }, { "key": "54-1-D" }, + { "key": "54-0-A" }, { "key": "54-0-S" } ] }, { - "key": 47, - "number": 47, - "name": "Route 47 Transcona - Pembina", + "key": 55, + "number": 55, + "name": "Route 55 St. Anne's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 47, + "badge-label": 55, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -75,31 +74,41 @@ "color": "#000000" }, "variants": [ - { "key": "47-0-K" }, - { "key": "47-0-R" }, - { "key": "47-1-U" }, - { "key": "47-1-#" } + { "key": "55-1-D" }, + { "key": "55-0-M" }, + { "key": "55-1-M" }, + { "key": "55-1-##" }, + { "key": "55-1-*" }, + { "key": "55-0-D" } ] }, { - "key": 57, - "number": 57, - "name": "Route 57 Southdale Express", + "key": 59, + "number": 59, + "name": "Route 59 South St. Anne's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", - "badge-label": 57, + "badge-label": 59, "badge-style": { "class-names": { "class-name": ["badge-label", "express"] }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "57-0-S" }, { "key": "57-1-D" }] + "variants": [ + { "key": "59-0-I" }, + { "key": "59-0-A" }, + { "key": "59-1-D" } + ] }, { "key": 14, "number": 14, "name": "Route 14 Ellice-St. Mary's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 14, @@ -110,53 +119,59 @@ "color": "#000000" }, "variants": [ - { "key": "14-0-P" }, { "key": "14-0-D" }, { "key": "14-1-E" }, - { "key": "14-1-##" } + { "key": "14-1-##" }, + { "key": "14-0-P" } ] }, { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", + "key": 57, + "number": 57, + "name": "Route 57 Southdale Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 53, + "coverage": "express", + "badge-label": 57, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "53-0-N" }, { "key": "53-1-D" }] + "variants": [{ "key": "57-1-D" }, { "key": "57-0-S" }] }, { - "key": 59, - "number": 59, - "name": "Route 59 South St. Anne's Express", + "key": 68, + "number": 68, + "name": "Route 68 Grosvenor", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "express", - "badge-label": 59, + "coverage": "regular", + "badge-label": 68, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "59-0-I" }, - { "key": "59-1-D" }, - { "key": "59-0-A" } + { "key": "68-0-R" }, + { "key": "68-1-#" }, + { "key": "68-1-D" } ] }, { - "key": 55, - "number": 55, - "name": "Route 55 St. Anne's", + "key": 19, + "number": 19, + "name": "Route 19 Marion-Logan-Notre Dame", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 55, + "badge-label": 19, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -164,32 +179,38 @@ "color": "#000000" }, "variants": [ - { "key": "55-0-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-D" }, - { "key": "55-1-*" } + { "key": "19-1-A" }, + { "key": "19-0-L" }, + { "key": "19-0-E" }, + { "key": "19-1-D" }, + { "key": "19-1-N" }, + { "key": "19-0-N" }, + { "key": "19-0-#" }, + { "key": "19-1-#" } ] }, { - "key": "BLUE", - "number": "BLUE", + "key": 47, + "number": 47, + "name": "Route 47 Transcona - Pembina", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "rapid transit", - "badge-label": "B", + "coverage": "regular", + "badge-label": 47, "badge-style": { - "class-names": { "class-name": ["badge-label", "rapid-transit"] }, - "background-color": "#0060a9", - "border-color": "#0060a9", - "color": "#ffffff" + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", + "color": "#000000" }, "variants": [ - { "key": "BLUE-0-S" }, - { "key": "BLUE-0-U" }, - { "key": "BLUE-1-D" } + { "key": "47-1-#" }, + { "key": "47-0-K" }, + { "key": "47-1-U" }, + { "key": "47-0-R" } ] } ], - "query-time": "2024-01-11T20:13:59" + "query-time": "2025-06-03T18:50:45" } diff --git a/tests/fixtures/stops/routes/stop_10639.json b/tests/fixtures/stops/routes/stop_10639.json index 6d17c66..fd3c9b1 100644 --- a/tests/fixtures/stops/routes/stop_10639.json +++ b/tests/fixtures/stops/routes/stop_10639.json @@ -1,51 +1,48 @@ { "routes": [ { - "key": 19, - "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "key": "BLUE", + "number": "BLUE", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 19, + "coverage": "rapid transit", + "badge-label": "B", "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" + "class-names": { "class-name": ["badge-label", "rapid-transit"] }, + "background-color": "#0060a9", + "border-color": "#0060a9", + "color": "#ffffff" }, "variants": [ - { "key": "19-0-N" }, - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-0-#" }, - { "key": "19-1-N" } + { "key": "BLUE-1-D" }, + { "key": "BLUE-0-U" }, + { "key": "BLUE-0-S" } ] }, { - "key": 68, - "number": 68, - "name": "Route 68 Grosvenor", + "key": 53, + "number": 53, + "name": "Route 53 Norwood", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 68, + "badge-label": 53, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [ - { "key": "68-1-D" }, - { "key": "68-0-R" }, - { "key": "68-1-#" } - ] + "variants": [{ "key": "53-1-D" }, { "key": "53-0-N" }] }, { "key": 54, "number": 54, "name": "Route 54 St. Mary's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", "badge-label": 54, @@ -56,18 +53,20 @@ "color": "#000000" }, "variants": [ - { "key": "54-0-A" }, { "key": "54-1-D" }, + { "key": "54-0-A" }, { "key": "54-0-S" } ] }, { - "key": 47, - "number": 47, - "name": "Route 47 Transcona - Pembina", + "key": 55, + "number": 55, + "name": "Route 55 St. Anne's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 47, + "badge-label": 55, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -75,31 +74,58 @@ "color": "#000000" }, "variants": [ - { "key": "47-0-K" }, - { "key": "47-0-R" }, - { "key": "47-1-U" }, - { "key": "47-1-#" } + { "key": "55-1-D" }, + { "key": "55-0-M" }, + { "key": "55-1-M" }, + { "key": "55-1-##" }, + { "key": "55-1-*" }, + { "key": "55-0-D" } ] }, { - "key": 57, - "number": 57, - "name": "Route 57 Southdale Express", + "key": 59, + "number": 59, + "name": "Route 59 South St. Anne's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", - "badge-label": 57, + "badge-label": 59, + "badge-style": { + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", + "color": "#000000" + }, + "variants": [ + { "key": "59-0-I" }, + { "key": "59-0-A" }, + { "key": "59-1-D" } + ] + }, + { + "key": 34, + "number": 34, + "name": "Route 34 McPhillips Super Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "super express", + "badge-label": 34, "badge-style": { "class-names": { "class-name": ["badge-label", "express"] }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "57-0-S" }, { "key": "57-1-D" }] + "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] }, { "key": 14, "number": 14, "name": "Route 14 Ellice-St. Mary's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 14, @@ -110,68 +136,59 @@ "color": "#000000" }, "variants": [ - { "key": "14-0-P" }, { "key": "14-0-D" }, { "key": "14-1-E" }, - { "key": "14-1-##" } + { "key": "14-1-##" }, + { "key": "14-0-P" } ] }, { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", - "customer-type": "regular", - "coverage": "regular", - "badge-label": 53, - "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" - }, - "variants": [{ "key": "53-0-N" }, { "key": "53-1-D" }] - }, - { - "key": 59, - "number": 59, - "name": "Route 59 South St. Anne's Express", + "key": 57, + "number": 57, + "name": "Route 57 Southdale Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", - "badge-label": 59, + "badge-label": 57, "badge-style": { "class-names": { "class-name": ["badge-label", "express"] }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [ - { "key": "59-0-I" }, - { "key": "59-1-D" }, - { "key": "59-0-A" } - ] + "variants": [{ "key": "57-1-D" }, { "key": "57-0-S" }] }, { - "key": 34, - "number": 34, - "name": "Route 34 McPhillips Super Express", + "key": 68, + "number": 68, + "name": "Route 68 Grosvenor", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "super express", - "badge-label": 34, + "coverage": "regular", + "badge-label": 68, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + "variants": [ + { "key": "68-0-R" }, + { "key": "68-1-#" }, + { "key": "68-1-D" } + ] }, { - "key": 55, - "number": 55, - "name": "Route 55 St. Anne's", + "key": 19, + "number": 19, + "name": "Route 19 Marion-Logan-Notre Dame", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 55, + "badge-label": 19, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -179,32 +196,38 @@ "color": "#000000" }, "variants": [ - { "key": "55-0-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-D" }, - { "key": "55-1-*" } + { "key": "19-1-A" }, + { "key": "19-0-L" }, + { "key": "19-0-E" }, + { "key": "19-1-D" }, + { "key": "19-1-N" }, + { "key": "19-0-N" }, + { "key": "19-0-#" }, + { "key": "19-1-#" } ] }, { - "key": "BLUE", - "number": "BLUE", + "key": 47, + "number": 47, + "name": "Route 47 Transcona - Pembina", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "rapid transit", - "badge-label": "B", + "coverage": "regular", + "badge-label": 47, "badge-style": { - "class-names": { "class-name": ["badge-label", "rapid-transit"] }, - "background-color": "#0060a9", - "border-color": "#0060a9", - "color": "#ffffff" + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", + "color": "#000000" }, "variants": [ - { "key": "BLUE-0-S" }, - { "key": "BLUE-0-U" }, - { "key": "BLUE-1-D" } + { "key": "47-1-#" }, + { "key": "47-0-K" }, + { "key": "47-1-U" }, + { "key": "47-0-R" } ] } ], - "query-time": "2024-01-11T20:14:04" + "query-time": "2025-06-03T18:50:53" } diff --git a/tests/fixtures/stops/routes/stop_10641.json b/tests/fixtures/stops/routes/stop_10641.json index ba4681a..10fcc1f 100644 --- a/tests/fixtures/stops/routes/stop_10641.json +++ b/tests/fixtures/stops/routes/stop_10641.json @@ -1,51 +1,48 @@ { "routes": [ { - "key": 19, - "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "key": "BLUE", + "number": "BLUE", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 19, + "coverage": "rapid transit", + "badge-label": "B", "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" + "class-names": { "class-name": ["badge-label", "rapid-transit"] }, + "background-color": "#0060a9", + "border-color": "#0060a9", + "color": "#ffffff" }, "variants": [ - { "key": "19-0-N" }, - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-0-#" }, - { "key": "19-1-N" } + { "key": "BLUE-1-D" }, + { "key": "BLUE-0-U" }, + { "key": "BLUE-0-S" } ] }, { - "key": 68, - "number": 68, - "name": "Route 68 Grosvenor", + "key": 53, + "number": 53, + "name": "Route 53 Norwood", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 68, + "badge-label": 53, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [ - { "key": "68-1-D" }, - { "key": "68-0-R" }, - { "key": "68-1-#" } - ] + "variants": [{ "key": "53-1-D" }, { "key": "53-0-N" }] }, { "key": 54, "number": 54, "name": "Route 54 St. Mary's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", "badge-label": 54, @@ -56,18 +53,20 @@ "color": "#000000" }, "variants": [ - { "key": "54-0-A" }, { "key": "54-1-D" }, + { "key": "54-0-A" }, { "key": "54-0-S" } ] }, { - "key": 47, - "number": 47, - "name": "Route 47 Transcona - Pembina", + "key": 55, + "number": 55, + "name": "Route 55 St. Anne's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 47, + "badge-label": 55, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -75,31 +74,41 @@ "color": "#000000" }, "variants": [ - { "key": "47-0-K" }, - { "key": "47-0-R" }, - { "key": "47-1-U" }, - { "key": "47-1-#" } + { "key": "55-1-D" }, + { "key": "55-0-M" }, + { "key": "55-1-M" }, + { "key": "55-1-##" }, + { "key": "55-1-*" }, + { "key": "55-0-D" } ] }, { - "key": 57, - "number": 57, - "name": "Route 57 Southdale Express", + "key": 59, + "number": 59, + "name": "Route 59 South St. Anne's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", - "badge-label": 57, + "badge-label": 59, "badge-style": { "class-names": { "class-name": ["badge-label", "express"] }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "57-0-S" }, { "key": "57-1-D" }] + "variants": [ + { "key": "59-0-I" }, + { "key": "59-0-A" }, + { "key": "59-1-D" } + ] }, { "key": 14, "number": 14, "name": "Route 14 Ellice-St. Mary's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 14, @@ -110,68 +119,116 @@ "color": "#000000" }, "variants": [ - { "key": "14-0-P" }, { "key": "14-0-D" }, { "key": "14-1-E" }, - { "key": "14-1-##" } + { "key": "14-1-##" }, + { "key": "14-0-P" } ] }, { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", + "key": 57, + "number": 57, + "name": "Route 57 Southdale Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "express", + "badge-label": 57, + "badge-style": { + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", + "color": "#000000" + }, + "variants": [{ "key": "57-1-D" }, { "key": "57-0-S" }] + }, + { + "key": 68, + "number": 68, + "name": "Route 68 Grosvenor", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 53, + "badge-label": 68, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "53-0-N" }, { "key": "53-1-D" }] + "variants": [ + { "key": "68-0-R" }, + { "key": "68-1-#" }, + { "key": "68-1-D" } + ] }, { - "key": 59, - "number": 59, - "name": "Route 59 South St. Anne's Express", + "key": 23, + "number": 23, + "name": "Route 23 Broadway - William", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "regular", + "badge-label": 23, + "badge-style": { + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", + "color": "#000000" + }, + "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] + }, + { + "key": 65, + "number": 65, + "name": "Route 65 Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", - "badge-label": 59, + "badge-label": 65, "badge-style": { "class-names": { "class-name": ["badge-label", "express"] }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [ - { "key": "59-0-I" }, - { "key": "59-1-D" }, - { "key": "59-0-A" } - ] + "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] }, { - "key": 34, - "number": 34, - "name": "Route 34 McPhillips Super Express", + "key": 66, + "number": 66, + "name": "Route 66 Grant", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "super express", - "badge-label": 34, + "coverage": "regular", + "badge-label": 66, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + "variants": [ + { "key": "66-1-D" }, + { "key": "66-0-P" }, + { "key": "66-1-K" }, + { "key": "66-0-U" }, + { "key": "66-0-C" } + ] }, { - "key": 55, - "number": 55, - "name": "Route 55 St. Anne's", + "key": 19, + "number": 19, + "name": "Route 19 Marion-Logan-Notre Dame", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 55, + "badge-label": 19, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -179,32 +236,38 @@ "color": "#000000" }, "variants": [ - { "key": "55-0-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-D" }, - { "key": "55-1-*" } + { "key": "19-1-A" }, + { "key": "19-0-L" }, + { "key": "19-0-E" }, + { "key": "19-1-D" }, + { "key": "19-1-N" }, + { "key": "19-0-N" }, + { "key": "19-0-#" }, + { "key": "19-1-#" } ] }, { - "key": "BLUE", - "number": "BLUE", + "key": 47, + "number": 47, + "name": "Route 47 Transcona - Pembina", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "rapid transit", - "badge-label": "B", + "coverage": "regular", + "badge-label": 47, "badge-style": { - "class-names": { "class-name": ["badge-label", "rapid-transit"] }, - "background-color": "#0060a9", - "border-color": "#0060a9", - "color": "#ffffff" + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", + "color": "#000000" }, "variants": [ - { "key": "BLUE-0-S" }, - { "key": "BLUE-0-U" }, - { "key": "BLUE-1-D" } + { "key": "47-1-#" }, + { "key": "47-0-K" }, + { "key": "47-1-U" }, + { "key": "47-0-R" } ] } ], - "query-time": "2024-01-11T20:14:00" + "query-time": "2025-06-03T18:50:46" } diff --git a/tests/fixtures/stops/routes/stop_10642.json b/tests/fixtures/stops/routes/stop_10642.json index 043c0d1..fb1d88f 100644 --- a/tests/fixtures/stops/routes/stop_10642.json +++ b/tests/fixtures/stops/routes/stop_10642.json @@ -1,246 +1 @@ -{ - "routes": [ - { - "key": 19, - "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", - "customer-type": "regular", - "coverage": "regular", - "badge-label": 19, - "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" - }, - "variants": [ - { "key": "19-0-N" }, - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-0-#" }, - { "key": "19-1-N" } - ] - }, - { - "key": 68, - "number": 68, - "name": "Route 68 Grosvenor", - "customer-type": "regular", - "coverage": "regular", - "badge-label": 68, - "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" - }, - "variants": [ - { "key": "68-1-D" }, - { "key": "68-0-R" }, - { "key": "68-1-#" } - ] - }, - { - "key": 54, - "number": 54, - "name": "Route 54 St. Mary's Express", - "customer-type": "regular", - "coverage": "express", - "badge-label": 54, - "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", - "color": "#000000" - }, - "variants": [ - { "key": "54-0-A" }, - { "key": "54-1-D" }, - { "key": "54-0-S" } - ] - }, - { - "key": 23, - "number": 23, - "name": "Route 23 Broadway - William", - "customer-type": "regular", - "coverage": "regular", - "badge-label": 23, - "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" - }, - "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] - }, - { - "key": 47, - "number": 47, - "name": "Route 47 Transcona - Pembina", - "customer-type": "regular", - "coverage": "regular", - "badge-label": 47, - "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" - }, - "variants": [ - { "key": "47-0-K" }, - { "key": "47-0-R" }, - { "key": "47-1-U" }, - { "key": "47-1-#" } - ] - }, - { - "key": 57, - "number": 57, - "name": "Route 57 Southdale Express", - "customer-type": "regular", - "coverage": "express", - "badge-label": 57, - "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", - "color": "#000000" - }, - "variants": [{ "key": "57-0-S" }, { "key": "57-1-D" }] - }, - { - "key": 14, - "number": 14, - "name": "Route 14 Ellice-St. Mary's", - "customer-type": "regular", - "coverage": "regular", - "badge-label": 14, - "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" - }, - "variants": [ - { "key": "14-0-P" }, - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" } - ] - }, - { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", - "customer-type": "regular", - "coverage": "regular", - "badge-label": 53, - "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" - }, - "variants": [{ "key": "53-0-N" }, { "key": "53-1-D" }] - }, - { - "key": 59, - "number": 59, - "name": "Route 59 South St. Anne's Express", - "customer-type": "regular", - "coverage": "express", - "badge-label": 59, - "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", - "color": "#000000" - }, - "variants": [ - { "key": "59-0-I" }, - { "key": "59-1-D" }, - { "key": "59-0-A" } - ] - }, - { - "key": 66, - "number": 66, - "name": "Route 66 Grant", - "customer-type": "regular", - "coverage": "regular", - "badge-label": 66, - "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" - }, - "variants": [ - { "key": "66-0-C" }, - { "key": "66-1-K" }, - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-0-U" } - ] - }, - { - "key": 55, - "number": 55, - "name": "Route 55 St. Anne's", - "customer-type": "regular", - "coverage": "regular", - "badge-label": 55, - "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", - "color": "#000000" - }, - "variants": [ - { "key": "55-0-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-D" }, - { "key": "55-1-*" } - ] - }, - { - "key": 65, - "number": 65, - "name": "Route 65 Grant Express", - "customer-type": "regular", - "coverage": "express", - "badge-label": 65, - "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", - "color": "#000000" - }, - "variants": [{ "key": "65-0-R" }, { "key": "65-1-D" }] - }, - { - "key": "BLUE", - "number": "BLUE", - "customer-type": "regular", - "coverage": "rapid transit", - "badge-label": "B", - "badge-style": { - "class-names": { "class-name": ["badge-label", "rapid-transit"] }, - "background-color": "#0060a9", - "border-color": "#0060a9", - "color": "#ffffff" - }, - "variants": [ - { "key": "BLUE-0-S" }, - { "key": "BLUE-0-U" }, - { "key": "BLUE-1-D" } - ] - } - ], - "query-time": "2024-01-11T20:14:01" -} +{ "routes": [], "query-time": "2025-06-03T18:50:47" } diff --git a/tests/fixtures/stops/routes/stop_10651.json b/tests/fixtures/stops/routes/stop_10651.json index 77466c4..433d659 100644 --- a/tests/fixtures/stops/routes/stop_10651.json +++ b/tests/fixtures/stops/routes/stop_10651.json @@ -1,9 +1,28 @@ { "routes": [ + { + "key": 65, + "number": 65, + "name": "Route 65 Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "express", + "badge-label": 65, + "badge-style": { + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", + "color": "#000000" + }, + "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + }, { "key": 66, "number": 66, "name": "Route 66 Grant", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 66, @@ -14,28 +33,13 @@ "color": "#000000" }, "variants": [ - { "key": "66-0-C" }, - { "key": "66-1-K" }, { "key": "66-1-D" }, { "key": "66-0-P" }, - { "key": "66-0-U" } + { "key": "66-1-K" }, + { "key": "66-0-U" }, + { "key": "66-0-C" } ] - }, - { - "key": 65, - "number": 65, - "name": "Route 65 Grant Express", - "customer-type": "regular", - "coverage": "express", - "badge-label": 65, - "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", - "color": "#000000" - }, - "variants": [{ "key": "65-0-R" }, { "key": "65-1-D" }] } ], - "query-time": "2024-01-11T20:14:05" + "query-time": "2025-06-03T18:50:55" } diff --git a/tests/fixtures/stops/routes/stop_10652.json b/tests/fixtures/stops/routes/stop_10652.json index 8856120..d8d08a4 100644 --- a/tests/fixtures/stops/routes/stop_10652.json +++ b/tests/fixtures/stops/routes/stop_10652.json @@ -1,9 +1,28 @@ { "routes": [ + { + "key": 65, + "number": 65, + "name": "Route 65 Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "express", + "badge-label": 65, + "badge-style": { + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", + "color": "#000000" + }, + "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + }, { "key": 66, "number": 66, "name": "Route 66 Grant", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 66, @@ -14,28 +33,13 @@ "color": "#000000" }, "variants": [ - { "key": "66-0-C" }, - { "key": "66-1-K" }, { "key": "66-1-D" }, { "key": "66-0-P" }, - { "key": "66-0-U" } + { "key": "66-1-K" }, + { "key": "66-0-U" }, + { "key": "66-0-C" } ] - }, - { - "key": 65, - "number": 65, - "name": "Route 65 Grant Express", - "customer-type": "regular", - "coverage": "express", - "badge-label": 65, - "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", - "color": "#000000" - }, - "variants": [{ "key": "65-0-R" }, { "key": "65-1-D" }] } ], - "query-time": "2024-01-11T20:14:10" + "query-time": "2025-06-03T18:51:00" } diff --git a/tests/fixtures/stops/routes/stop_10672.json b/tests/fixtures/stops/routes/stop_10672.json index 2c70178..d8d08a4 100644 --- a/tests/fixtures/stops/routes/stop_10672.json +++ b/tests/fixtures/stops/routes/stop_10672.json @@ -1,9 +1,28 @@ { "routes": [ + { + "key": 65, + "number": 65, + "name": "Route 65 Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "express", + "badge-label": 65, + "badge-style": { + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", + "color": "#000000" + }, + "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + }, { "key": 66, "number": 66, "name": "Route 66 Grant", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 66, @@ -14,28 +33,13 @@ "color": "#000000" }, "variants": [ - { "key": "66-0-C" }, - { "key": "66-1-K" }, { "key": "66-1-D" }, { "key": "66-0-P" }, - { "key": "66-0-U" } + { "key": "66-1-K" }, + { "key": "66-0-U" }, + { "key": "66-0-C" } ] - }, - { - "key": 65, - "number": 65, - "name": "Route 65 Grant Express", - "customer-type": "regular", - "coverage": "express", - "badge-label": 65, - "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, - "background-color": "#eed700", - "border-color": "#cab700", - "color": "#000000" - }, - "variants": [{ "key": "65-0-R" }, { "key": "65-1-D" }] } ], - "query-time": "2024-01-11T20:14:09" + "query-time": "2025-06-03T18:51:00" } diff --git a/tests/fixtures/stops/routes/stop_10675.json b/tests/fixtures/stops/routes/stop_10675.json index 514fc72..bec9a44 100644 --- a/tests/fixtures/stops/routes/stop_10675.json +++ b/tests/fixtures/stops/routes/stop_10675.json @@ -1 +1 @@ -{ "routes": [], "query-time": "2024-01-11T20:14:06" } +{ "routes": [], "query-time": "2025-06-03T18:50:56" } diff --git a/tests/fixtures/stops/routes/stop_10803.json b/tests/fixtures/stops/routes/stop_10803.json index f9b78d3..71883a8 100644 --- a/tests/fixtures/stops/routes/stop_10803.json +++ b/tests/fixtures/stops/routes/stop_10803.json @@ -1,29 +1,28 @@ { "routes": [ { - "key": 50, - "number": 50, - "name": "Route 50 Archibald", + "key": 38, + "number": 38, + "name": "Route 38 Salter", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 50, + "badge-label": 38, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [ - { "key": "50-1-D" }, - { "key": "50-0-S" }, - { "key": "50-1-*" }, - { "key": "50-1-W" } - ] + "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] }, { "key": 43, "number": 43, "name": "Route 43 Munroe", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 43, @@ -33,15 +32,17 @@ "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "43-1-D" }, { "key": "43-0-K" }] + "variants": [{ "key": "43-0-K" }, { "key": "43-1-D" }] }, { - "key": 10, - "number": 10, - "name": "Route 10 St. Boniface-West Broadway", + "key": 49, + "number": 49, + "name": "Route 49 Dugald", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 10, + "badge-label": 49, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -49,36 +50,42 @@ "color": "#000000" }, "variants": [ - { "key": "10-1-WT" }, - { "key": "10-0-SP" }, - { "key": "10-1-WP" }, - { "key": "10-0-ST" }, - { "key": "10-1-W" }, - { "key": "10-1-#" } + { "key": "49-0-S" }, + { "key": "49-1-D" }, + { "key": "49-0-T" } ] }, { - "key": 38, - "number": 38, - "name": "Route 38 Salter", + "key": 50, + "number": 50, + "name": "Route 50 Archibald", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 38, + "badge-label": 50, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] + "variants": [ + { "key": "50-1-D" }, + { "key": "50-1-W" }, + { "key": "50-0-S" }, + { "key": "50-1-*" } + ] }, { - "key": 49, - "number": 49, - "name": "Route 49 Dugald", + "key": 10, + "number": 10, + "name": "Route 10 St. Boniface-West Broadway", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 49, + "badge-label": 10, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -86,15 +93,20 @@ "color": "#000000" }, "variants": [ - { "key": "49-0-T" }, - { "key": "49-0-S" }, - { "key": "49-1-D" } + { "key": "10-0-SP" }, + { "key": "10-0-ST" }, + { "key": "10-1-WT" }, + { "key": "10-1-#" }, + { "key": "10-1-WP" }, + { "key": "10-1-W" } ] }, { "key": 56, "number": 56, "name": "Route 56 St. Boniface", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 56, @@ -107,5 +119,5 @@ "variants": [{ "key": "56-0-S" }, { "key": "56-1-D" }] } ], - "query-time": "2024-01-11T20:14:07" + "query-time": "2025-06-03T18:50:57" } diff --git a/tests/fixtures/stops/routes/stop_10804.json b/tests/fixtures/stops/routes/stop_10804.json index f9b78d3..71883a8 100644 --- a/tests/fixtures/stops/routes/stop_10804.json +++ b/tests/fixtures/stops/routes/stop_10804.json @@ -1,29 +1,28 @@ { "routes": [ { - "key": 50, - "number": 50, - "name": "Route 50 Archibald", + "key": 38, + "number": 38, + "name": "Route 38 Salter", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 50, + "badge-label": 38, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [ - { "key": "50-1-D" }, - { "key": "50-0-S" }, - { "key": "50-1-*" }, - { "key": "50-1-W" } - ] + "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] }, { "key": 43, "number": 43, "name": "Route 43 Munroe", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 43, @@ -33,15 +32,17 @@ "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "43-1-D" }, { "key": "43-0-K" }] + "variants": [{ "key": "43-0-K" }, { "key": "43-1-D" }] }, { - "key": 10, - "number": 10, - "name": "Route 10 St. Boniface-West Broadway", + "key": 49, + "number": 49, + "name": "Route 49 Dugald", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 10, + "badge-label": 49, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -49,36 +50,42 @@ "color": "#000000" }, "variants": [ - { "key": "10-1-WT" }, - { "key": "10-0-SP" }, - { "key": "10-1-WP" }, - { "key": "10-0-ST" }, - { "key": "10-1-W" }, - { "key": "10-1-#" } + { "key": "49-0-S" }, + { "key": "49-1-D" }, + { "key": "49-0-T" } ] }, { - "key": 38, - "number": 38, - "name": "Route 38 Salter", + "key": 50, + "number": 50, + "name": "Route 50 Archibald", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 38, + "badge-label": 50, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] + "variants": [ + { "key": "50-1-D" }, + { "key": "50-1-W" }, + { "key": "50-0-S" }, + { "key": "50-1-*" } + ] }, { - "key": 49, - "number": 49, - "name": "Route 49 Dugald", + "key": 10, + "number": 10, + "name": "Route 10 St. Boniface-West Broadway", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 49, + "badge-label": 10, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", @@ -86,15 +93,20 @@ "color": "#000000" }, "variants": [ - { "key": "49-0-T" }, - { "key": "49-0-S" }, - { "key": "49-1-D" } + { "key": "10-0-SP" }, + { "key": "10-0-ST" }, + { "key": "10-1-WT" }, + { "key": "10-1-#" }, + { "key": "10-1-WP" }, + { "key": "10-1-W" } ] }, { "key": 56, "number": 56, "name": "Route 56 St. Boniface", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 56, @@ -107,5 +119,5 @@ "variants": [{ "key": "56-0-S" }, { "key": "56-1-D" }] } ], - "query-time": "2024-01-11T20:14:07" + "query-time": "2025-06-03T18:50:57" } diff --git a/tests/fixtures/stops/routes/stop_10830.json b/tests/fixtures/stops/routes/stop_10830.json index 430bf01..7728bd4 100644 --- a/tests/fixtures/stops/routes/stop_10830.json +++ b/tests/fixtures/stops/routes/stop_10830.json @@ -4,6 +4,8 @@ "key": 23, "number": 23, "name": "Route 23 Broadway - William", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 23, @@ -16,5 +18,5 @@ "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] } ], - "query-time": "2024-01-11T20:14:03" + "query-time": "2025-06-03T18:50:51" } diff --git a/tests/fixtures/stops/routes/stop_10901.json b/tests/fixtures/stops/routes/stop_10901.json index b686410..dd82b2d 100644 --- a/tests/fixtures/stops/routes/stop_10901.json +++ b/tests/fixtures/stops/routes/stop_10901.json @@ -4,6 +4,8 @@ "key": 38, "number": 38, "name": "Route 38 Salter", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 38, @@ -16,5 +18,5 @@ "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] } ], - "query-time": "2024-01-11T20:14:01" + "query-time": "2025-06-03T18:50:50" } diff --git a/tests/fixtures/stops/routes/stop_10902.json b/tests/fixtures/stops/routes/stop_10902.json index 19d718d..dd82b2d 100644 --- a/tests/fixtures/stops/routes/stop_10902.json +++ b/tests/fixtures/stops/routes/stop_10902.json @@ -4,6 +4,8 @@ "key": 38, "number": 38, "name": "Route 38 Salter", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 38, @@ -16,5 +18,5 @@ "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] } ], - "query-time": "2024-01-11T20:14:02" + "query-time": "2025-06-03T18:50:50" } diff --git a/tests/fixtures/stops/routes/stop_10907.json b/tests/fixtures/stops/routes/stop_10907.json index 0dbb9ad..579fc54 100644 --- a/tests/fixtures/stops/routes/stop_10907.json +++ b/tests/fixtures/stops/routes/stop_10907.json @@ -4,6 +4,8 @@ "key": 38, "number": 38, "name": "Route 38 Salter", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 38, @@ -16,5 +18,5 @@ "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] } ], - "query-time": "2024-01-11T20:14:03" + "query-time": "2025-06-03T18:50:52" } diff --git a/tests/fixtures/stops/routes/stop_10939.json b/tests/fixtures/stops/routes/stop_10939.json index f51f432..0e42bee 100644 --- a/tests/fixtures/stops/routes/stop_10939.json +++ b/tests/fixtures/stops/routes/stop_10939.json @@ -4,6 +4,8 @@ "key": 38, "number": 38, "name": "Route 38 Salter", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", "badge-label": 38, @@ -16,5 +18,5 @@ "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] } ], - "query-time": "2024-01-11T20:14:04" + "query-time": "2025-06-03T18:50:54" } diff --git a/tests/fixtures/stops/routes/stop_11010.json b/tests/fixtures/stops/routes/stop_11010.json index 9a9a337..18ef4c4 100644 --- a/tests/fixtures/stops/routes/stop_11010.json +++ b/tests/fixtures/stops/routes/stop_11010.json @@ -4,6 +4,8 @@ "key": 34, "number": 34, "name": "Route 34 McPhillips Super Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "super express", "badge-label": 34, @@ -16,5 +18,5 @@ "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] } ], - "query-time": "2024-01-11T20:14:00" + "query-time": "2025-06-03T18:50:47" } diff --git a/tests/fixtures/stops/routes/stop_11024.json b/tests/fixtures/stops/routes/stop_11024.json index 785e1d6..a49e9d7 100644 --- a/tests/fixtures/stops/routes/stop_11024.json +++ b/tests/fixtures/stops/routes/stop_11024.json @@ -4,6 +4,8 @@ "key": 34, "number": 34, "name": "Route 34 McPhillips Super Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "super express", "badge-label": 34, @@ -16,5 +18,5 @@ "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] } ], - "query-time": "2024-01-11T20:14:06" + "query-time": "2025-06-03T18:50:55" } diff --git a/tests/fixtures/stops/routes/stop_11051.json b/tests/fixtures/stops/routes/stop_11051.json index 40d0619..dd2063b 100644 --- a/tests/fixtures/stops/routes/stop_11051.json +++ b/tests/fixtures/stops/routes/stop_11051.json @@ -1,40 +1,44 @@ { "routes": [ { - "key": 47, - "number": 47, - "name": "Route 47 Transcona - Pembina", + "key": 53, + "number": 53, + "name": "Route 53 Norwood", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 47, + "badge-label": 53, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [ - { "key": "47-0-K" }, - { "key": "47-0-R" }, - { "key": "47-1-U" }, - { "key": "47-1-#" } - ] + "variants": [{ "key": "53-1-D" }, { "key": "53-0-N" }] }, { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", + "key": 47, + "number": 47, + "name": "Route 47 Transcona - Pembina", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 53, + "badge-label": 47, "badge-style": { "class-names": { "class-name": ["badge-label", "regular"] }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "53-0-N" }, { "key": "53-1-D" }] + "variants": [ + { "key": "47-1-#" }, + { "key": "47-0-K" }, + { "key": "47-1-U" }, + { "key": "47-0-R" } + ] } ], - "query-time": "2024-01-11T20:14:05" + "query-time": "2025-06-03T18:50:54" } diff --git a/tests/fixtures/stops/routes/stop_11052.json b/tests/fixtures/stops/routes/stop_11052.json index 07058d5..f18bb44 100644 --- a/tests/fixtures/stops/routes/stop_11052.json +++ b/tests/fixtures/stops/routes/stop_11052.json @@ -1,30 +1,28 @@ { "routes": [ { - "key": 66, - "number": 66, - "name": "Route 66 Grant", + "key": 34, + "number": 34, + "name": "Route 34 McPhillips Super Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 66, + "coverage": "super express", + "badge-label": 34, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, - "background-color": "#ffffff", - "border-color": "#d9d9d9", + "class-names": { "class-name": ["badge-label", "express"] }, + "background-color": "#eed700", + "border-color": "#cab700", "color": "#000000" }, - "variants": [ - { "key": "66-0-C" }, - { "key": "66-1-K" }, - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-0-U" } - ] + "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] }, { "key": 65, "number": 65, "name": "Route 65 Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "express", "badge-label": 65, @@ -34,8 +32,31 @@ "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "65-0-R" }, { "key": "65-1-D" }] + "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + }, + { + "key": 66, + "number": 66, + "name": "Route 66 Grant", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "customer-type": "regular", + "coverage": "regular", + "badge-label": 66, + "badge-style": { + "class-names": { "class-name": ["badge-label", "regular"] }, + "background-color": "#ffffff", + "border-color": "#d9d9d9", + "color": "#000000" + }, + "variants": [ + { "key": "66-1-D" }, + { "key": "66-0-P" }, + { "key": "66-1-K" }, + { "key": "66-0-U" }, + { "key": "66-0-C" } + ] } ], - "query-time": "2024-01-11T20:14:00" + "query-time": "2025-06-03T18:50:47" } From 9ac1aeb0b1a654321ab36ab6343090cf4c51267d Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Tue, 3 Jun 2025 18:57:11 -0500 Subject: [PATCH 03/13] Add formatting of fixtures --- tests/fixtures/stops/fetch.sh | 2 +- tests/fixtures/stops/routes/stop_10157.json | 106 ++++++-- tests/fixtures/stops/routes/stop_10158.json | 165 +++++++++--- tests/fixtures/stops/routes/stop_10588.json | 34 ++- tests/fixtures/stops/routes/stop_10589.json | 77 +++++- tests/fixtures/stops/routes/stop_10590.json | 77 +++++- tests/fixtures/stops/routes/stop_10591.json | 34 ++- tests/fixtures/stops/routes/stop_10620.json | 168 +++++++++--- tests/fixtures/stops/routes/stop_10624.json | 226 ++++++++++++---- tests/fixtures/stops/routes/stop_10625.json | 226 ++++++++++++---- tests/fixtures/stops/routes/stop_10639.json | 242 +++++++++++++---- tests/fixtures/stops/routes/stop_10641.json | 285 ++++++++++++++++---- tests/fixtures/stops/routes/stop_10642.json | 5 +- tests/fixtures/stops/routes/stop_10651.json | 45 +++- tests/fixtures/stops/routes/stop_10652.json | 45 +++- tests/fixtures/stops/routes/stop_10672.json | 45 +++- tests/fixtures/stops/routes/stop_10675.json | 5 +- tests/fixtures/stops/routes/stop_10803.json | 123 +++++++-- tests/fixtures/stops/routes/stop_10804.json | 123 +++++++-- tests/fixtures/stops/routes/stop_10830.json | 18 +- tests/fixtures/stops/routes/stop_10901.json | 18 +- tests/fixtures/stops/routes/stop_10902.json | 18 +- tests/fixtures/stops/routes/stop_10907.json | 18 +- tests/fixtures/stops/routes/stop_10939.json | 18 +- tests/fixtures/stops/routes/stop_11010.json | 18 +- tests/fixtures/stops/routes/stop_11024.json | 18 +- tests/fixtures/stops/routes/stop_11051.json | 41 ++- tests/fixtures/stops/routes/stop_11052.json | 61 ++++- 28 files changed, 1817 insertions(+), 444 deletions(-) diff --git a/tests/fixtures/stops/fetch.sh b/tests/fixtures/stops/fetch.sh index 5986562..e9712a3 100755 --- a/tests/fixtures/stops/fetch.sh +++ b/tests/fixtures/stops/fetch.sh @@ -4,5 +4,5 @@ STOP_NUMBERS=(10625 10641 11052 11010 10642 10901 10902 10624 10830 10590 10907 for STOP_NUMBER in "${STOP_NUMBERS[@]}" do - curl -o "routes/stop_${STOP_NUMBER}.json" "https://api.winnipegtransit.com/v4/routes.json?api-key=${API_KEY}&stop=${STOP_NUMBER}&effective-on=$(date +%Y-%m-%d)" + curl "https://api.winnipegtransit.com/v4/routes.json?api-key=${API_KEY}&stop=${STOP_NUMBER}&effective-on=$(date +%Y-%m-%d)" | jq "." > "routes/stop_${STOP_NUMBER}.json" done \ No newline at end of file diff --git a/tests/fixtures/stops/routes/stop_10157.json b/tests/fixtures/stops/routes/stop_10157.json index 368dad5..45b54a4 100644 --- a/tests/fixtures/stops/routes/stop_10157.json +++ b/tests/fixtures/stops/routes/stop_10157.json @@ -9,15 +9,26 @@ "coverage": "rapid transit", "badge-label": "B", "badge-style": { - "class-names": { "class-name": ["badge-label", "rapid-transit"] }, + "class-names": { + "class-name": [ + "badge-label", + "rapid-transit" + ] + }, "background-color": "#0060a9", "border-color": "#0060a9", "color": "#ffffff" }, "variants": [ - { "key": "BLUE-1-D" }, - { "key": "BLUE-0-U" }, - { "key": "BLUE-0-S" } + { + "key": "BLUE-1-D" + }, + { + "key": "BLUE-0-U" + }, + { + "key": "BLUE-0-S" + } ] }, { @@ -30,15 +41,26 @@ "coverage": "regular", "badge-label": 68, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "68-0-R" }, - { "key": "68-1-#" }, - { "key": "68-1-D" } + { + "key": "68-0-R" + }, + { + "key": "68-1-#" + }, + { + "key": "68-1-D" + } ] }, { @@ -51,12 +73,24 @@ "coverage": "express", "badge-label": 65, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + "variants": [ + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } + ] }, { "key": 66, @@ -68,17 +102,32 @@ "coverage": "regular", "badge-label": 66, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-1-K" }, - { "key": "66-0-U" }, - { "key": "66-0-C" } + { + "key": "66-1-D" + }, + { + "key": "66-0-P" + }, + { + "key": "66-1-K" + }, + { + "key": "66-0-U" + }, + { + "key": "66-0-C" + } ] }, { @@ -91,18 +140,31 @@ "coverage": "regular", "badge-label": 47, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "47-1-#" }, - { "key": "47-0-K" }, - { "key": "47-1-U" }, - { "key": "47-0-R" } + { + "key": "47-1-#" + }, + { + "key": "47-0-K" + }, + { + "key": "47-1-U" + }, + { + "key": "47-0-R" + } ] } ], - "query-time": "2025-06-03T18:51:01" + "query-time": "2025-06-03T18:56:42" } diff --git a/tests/fixtures/stops/routes/stop_10158.json b/tests/fixtures/stops/routes/stop_10158.json index ab476a2..77fed4f 100644 --- a/tests/fixtures/stops/routes/stop_10158.json +++ b/tests/fixtures/stops/routes/stop_10158.json @@ -10,12 +10,24 @@ "coverage": "regular", "badge-label": 53, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "53-1-D" }, { "key": "53-0-N" }] + "variants": [ + { + "key": "53-1-D" + }, + { + "key": "53-0-N" + } + ] }, { "key": 54, @@ -27,15 +39,26 @@ "coverage": "express", "badge-label": 54, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "54-1-D" }, - { "key": "54-0-A" }, - { "key": "54-0-S" } + { + "key": "54-1-D" + }, + { + "key": "54-0-A" + }, + { + "key": "54-0-S" + } ] }, { @@ -48,18 +71,35 @@ "coverage": "regular", "badge-label": 55, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "55-1-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-*" }, - { "key": "55-0-D" } + { + "key": "55-1-D" + }, + { + "key": "55-0-M" + }, + { + "key": "55-1-M" + }, + { + "key": "55-1-##" + }, + { + "key": "55-1-*" + }, + { + "key": "55-0-D" + } ] }, { @@ -72,15 +112,26 @@ "coverage": "express", "badge-label": 59, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "59-0-I" }, - { "key": "59-0-A" }, - { "key": "59-1-D" } + { + "key": "59-0-I" + }, + { + "key": "59-0-A" + }, + { + "key": "59-1-D" + } ] }, { @@ -93,16 +144,29 @@ "coverage": "regular", "badge-label": 14, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" }, - { "key": "14-0-P" } + { + "key": "14-0-D" + }, + { + "key": "14-1-E" + }, + { + "key": "14-1-##" + }, + { + "key": "14-0-P" + } ] }, { @@ -115,12 +179,24 @@ "coverage": "express", "badge-label": 57, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "57-1-D" }, { "key": "57-0-S" }] + "variants": [ + { + "key": "57-1-D" + }, + { + "key": "57-0-S" + } + ] }, { "key": 19, @@ -132,22 +208,43 @@ "coverage": "regular", "badge-label": 19, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-1-N" }, - { "key": "19-0-N" }, - { "key": "19-0-#" }, - { "key": "19-1-#" } + { + "key": "19-1-A" + }, + { + "key": "19-0-L" + }, + { + "key": "19-0-E" + }, + { + "key": "19-1-D" + }, + { + "key": "19-1-N" + }, + { + "key": "19-0-N" + }, + { + "key": "19-0-#" + }, + { + "key": "19-1-#" + } ] } ], - "query-time": "2025-06-03T18:50:59" + "query-time": "2025-06-03T18:56:41" } diff --git a/tests/fixtures/stops/routes/stop_10588.json b/tests/fixtures/stops/routes/stop_10588.json index 71d3e1d..83e7a2b 100644 --- a/tests/fixtures/stops/routes/stop_10588.json +++ b/tests/fixtures/stops/routes/stop_10588.json @@ -10,12 +10,24 @@ "coverage": "super express", "badge-label": 34, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + "variants": [ + { + "key": "34-0-M" + }, + { + "key": "34-1-D" + } + ] }, { "key": 23, @@ -27,13 +39,25 @@ "coverage": "regular", "badge-label": 23, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] + "variants": [ + { + "key": "23-1-C" + }, + { + "key": "23-0-A" + } + ] } ], - "query-time": "2025-06-03T18:51:00" + "query-time": "2025-06-03T18:56:41" } diff --git a/tests/fixtures/stops/routes/stop_10589.json b/tests/fixtures/stops/routes/stop_10589.json index fdc10de..42bacc2 100644 --- a/tests/fixtures/stops/routes/stop_10589.json +++ b/tests/fixtures/stops/routes/stop_10589.json @@ -10,12 +10,24 @@ "coverage": "super express", "badge-label": 34, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + "variants": [ + { + "key": "34-0-M" + }, + { + "key": "34-1-D" + } + ] }, { "key": 23, @@ -27,12 +39,24 @@ "coverage": "regular", "badge-label": 23, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] + "variants": [ + { + "key": "23-1-C" + }, + { + "key": "23-0-A" + } + ] }, { "key": 65, @@ -44,12 +68,24 @@ "coverage": "express", "badge-label": 65, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + "variants": [ + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } + ] }, { "key": 66, @@ -61,19 +97,34 @@ "coverage": "regular", "badge-label": 66, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-1-K" }, - { "key": "66-0-U" }, - { "key": "66-0-C" } + { + "key": "66-1-D" + }, + { + "key": "66-0-P" + }, + { + "key": "66-1-K" + }, + { + "key": "66-0-U" + }, + { + "key": "66-0-C" + } ] } ], - "query-time": "2025-06-03T18:50:54" + "query-time": "2025-06-03T18:56:34" } diff --git a/tests/fixtures/stops/routes/stop_10590.json b/tests/fixtures/stops/routes/stop_10590.json index 407cc01..0e84182 100644 --- a/tests/fixtures/stops/routes/stop_10590.json +++ b/tests/fixtures/stops/routes/stop_10590.json @@ -10,12 +10,24 @@ "coverage": "super express", "badge-label": 34, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + "variants": [ + { + "key": "34-0-M" + }, + { + "key": "34-1-D" + } + ] }, { "key": 23, @@ -27,12 +39,24 @@ "coverage": "regular", "badge-label": 23, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] + "variants": [ + { + "key": "23-1-C" + }, + { + "key": "23-0-A" + } + ] }, { "key": 65, @@ -44,12 +68,24 @@ "coverage": "express", "badge-label": 65, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + "variants": [ + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } + ] }, { "key": 66, @@ -61,19 +97,34 @@ "coverage": "regular", "badge-label": 66, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-1-K" }, - { "key": "66-0-U" }, - { "key": "66-0-C" } + { + "key": "66-1-D" + }, + { + "key": "66-0-P" + }, + { + "key": "66-1-K" + }, + { + "key": "66-0-U" + }, + { + "key": "66-0-C" + } ] } ], - "query-time": "2025-06-03T18:50:52" + "query-time": "2025-06-03T18:56:31" } diff --git a/tests/fixtures/stops/routes/stop_10591.json b/tests/fixtures/stops/routes/stop_10591.json index 13a2ef7..96a5b99 100644 --- a/tests/fixtures/stops/routes/stop_10591.json +++ b/tests/fixtures/stops/routes/stop_10591.json @@ -10,12 +10,24 @@ "coverage": "super express", "badge-label": 34, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + "variants": [ + { + "key": "34-0-M" + }, + { + "key": "34-1-D" + } + ] }, { "key": 23, @@ -27,13 +39,25 @@ "coverage": "regular", "badge-label": 23, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] + "variants": [ + { + "key": "23-1-C" + }, + { + "key": "23-0-A" + } + ] } ], - "query-time": "2025-06-03T18:50:58" + "query-time": "2025-06-03T18:56:38" } diff --git a/tests/fixtures/stops/routes/stop_10620.json b/tests/fixtures/stops/routes/stop_10620.json index 07ee547..dcbfcca 100644 --- a/tests/fixtures/stops/routes/stop_10620.json +++ b/tests/fixtures/stops/routes/stop_10620.json @@ -10,15 +10,26 @@ "coverage": "express", "badge-label": 54, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "54-1-D" }, - { "key": "54-0-A" }, - { "key": "54-0-S" } + { + "key": "54-1-D" + }, + { + "key": "54-0-A" + }, + { + "key": "54-0-S" + } ] }, { @@ -31,18 +42,35 @@ "coverage": "regular", "badge-label": 55, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "55-1-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-*" }, - { "key": "55-0-D" } + { + "key": "55-1-D" + }, + { + "key": "55-0-M" + }, + { + "key": "55-1-M" + }, + { + "key": "55-1-##" + }, + { + "key": "55-1-*" + }, + { + "key": "55-0-D" + } ] }, { @@ -55,15 +83,26 @@ "coverage": "express", "badge-label": 59, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "59-0-I" }, - { "key": "59-0-A" }, - { "key": "59-1-D" } + { + "key": "59-0-I" + }, + { + "key": "59-0-A" + }, + { + "key": "59-1-D" + } ] }, { @@ -76,16 +115,29 @@ "coverage": "regular", "badge-label": 14, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" }, - { "key": "14-0-P" } + { + "key": "14-0-D" + }, + { + "key": "14-1-E" + }, + { + "key": "14-1-##" + }, + { + "key": "14-0-P" + } ] }, { @@ -98,12 +150,24 @@ "coverage": "express", "badge-label": 57, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "57-1-D" }, { "key": "57-0-S" }] + "variants": [ + { + "key": "57-1-D" + }, + { + "key": "57-0-S" + } + ] }, { "key": 68, @@ -115,15 +179,26 @@ "coverage": "regular", "badge-label": 68, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "68-0-R" }, - { "key": "68-1-#" }, - { "key": "68-1-D" } + { + "key": "68-0-R" + }, + { + "key": "68-1-#" + }, + { + "key": "68-1-D" + } ] }, { @@ -136,22 +211,43 @@ "coverage": "regular", "badge-label": 19, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-1-N" }, - { "key": "19-0-N" }, - { "key": "19-0-#" }, - { "key": "19-1-#" } + { + "key": "19-1-A" + }, + { + "key": "19-0-L" + }, + { + "key": "19-0-E" + }, + { + "key": "19-1-D" + }, + { + "key": "19-1-N" + }, + { + "key": "19-0-N" + }, + { + "key": "19-0-#" + }, + { + "key": "19-1-#" + } ] } ], - "query-time": "2025-06-03T18:50:56" + "query-time": "2025-06-03T18:56:35" } diff --git a/tests/fixtures/stops/routes/stop_10624.json b/tests/fixtures/stops/routes/stop_10624.json index afee42a..eb6f18a 100644 --- a/tests/fixtures/stops/routes/stop_10624.json +++ b/tests/fixtures/stops/routes/stop_10624.json @@ -9,15 +9,26 @@ "coverage": "rapid transit", "badge-label": "B", "badge-style": { - "class-names": { "class-name": ["badge-label", "rapid-transit"] }, + "class-names": { + "class-name": [ + "badge-label", + "rapid-transit" + ] + }, "background-color": "#0060a9", "border-color": "#0060a9", "color": "#ffffff" }, "variants": [ - { "key": "BLUE-1-D" }, - { "key": "BLUE-0-U" }, - { "key": "BLUE-0-S" } + { + "key": "BLUE-1-D" + }, + { + "key": "BLUE-0-U" + }, + { + "key": "BLUE-0-S" + } ] }, { @@ -30,12 +41,24 @@ "coverage": "regular", "badge-label": 53, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "53-1-D" }, { "key": "53-0-N" }] + "variants": [ + { + "key": "53-1-D" + }, + { + "key": "53-0-N" + } + ] }, { "key": 54, @@ -47,15 +70,26 @@ "coverage": "express", "badge-label": 54, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "54-1-D" }, - { "key": "54-0-A" }, - { "key": "54-0-S" } + { + "key": "54-1-D" + }, + { + "key": "54-0-A" + }, + { + "key": "54-0-S" + } ] }, { @@ -68,18 +102,35 @@ "coverage": "regular", "badge-label": 55, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "55-1-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-*" }, - { "key": "55-0-D" } + { + "key": "55-1-D" + }, + { + "key": "55-0-M" + }, + { + "key": "55-1-M" + }, + { + "key": "55-1-##" + }, + { + "key": "55-1-*" + }, + { + "key": "55-0-D" + } ] }, { @@ -92,15 +143,26 @@ "coverage": "express", "badge-label": 59, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "59-0-I" }, - { "key": "59-0-A" }, - { "key": "59-1-D" } + { + "key": "59-0-I" + }, + { + "key": "59-0-A" + }, + { + "key": "59-1-D" + } ] }, { @@ -113,16 +175,29 @@ "coverage": "regular", "badge-label": 14, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" }, - { "key": "14-0-P" } + { + "key": "14-0-D" + }, + { + "key": "14-1-E" + }, + { + "key": "14-1-##" + }, + { + "key": "14-0-P" + } ] }, { @@ -135,12 +210,24 @@ "coverage": "express", "badge-label": 57, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "57-1-D" }, { "key": "57-0-S" }] + "variants": [ + { + "key": "57-1-D" + }, + { + "key": "57-0-S" + } + ] }, { "key": 68, @@ -152,15 +239,26 @@ "coverage": "regular", "badge-label": 68, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "68-0-R" }, - { "key": "68-1-#" }, - { "key": "68-1-D" } + { + "key": "68-0-R" + }, + { + "key": "68-1-#" + }, + { + "key": "68-1-D" + } ] }, { @@ -173,20 +271,41 @@ "coverage": "regular", "badge-label": 19, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-1-N" }, - { "key": "19-0-N" }, - { "key": "19-0-#" }, - { "key": "19-1-#" } + { + "key": "19-1-A" + }, + { + "key": "19-0-L" + }, + { + "key": "19-0-E" + }, + { + "key": "19-1-D" + }, + { + "key": "19-1-N" + }, + { + "key": "19-0-N" + }, + { + "key": "19-0-#" + }, + { + "key": "19-1-#" + } ] }, { @@ -199,18 +318,31 @@ "coverage": "regular", "badge-label": 47, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "47-1-#" }, - { "key": "47-0-K" }, - { "key": "47-1-U" }, - { "key": "47-0-R" } + { + "key": "47-1-#" + }, + { + "key": "47-0-K" + }, + { + "key": "47-1-U" + }, + { + "key": "47-0-R" + } ] } ], - "query-time": "2025-06-03T18:50:51" + "query-time": "2025-06-03T18:56:30" } diff --git a/tests/fixtures/stops/routes/stop_10625.json b/tests/fixtures/stops/routes/stop_10625.json index 35f84e0..051508d 100644 --- a/tests/fixtures/stops/routes/stop_10625.json +++ b/tests/fixtures/stops/routes/stop_10625.json @@ -9,15 +9,26 @@ "coverage": "rapid transit", "badge-label": "B", "badge-style": { - "class-names": { "class-name": ["badge-label", "rapid-transit"] }, + "class-names": { + "class-name": [ + "badge-label", + "rapid-transit" + ] + }, "background-color": "#0060a9", "border-color": "#0060a9", "color": "#ffffff" }, "variants": [ - { "key": "BLUE-1-D" }, - { "key": "BLUE-0-U" }, - { "key": "BLUE-0-S" } + { + "key": "BLUE-1-D" + }, + { + "key": "BLUE-0-U" + }, + { + "key": "BLUE-0-S" + } ] }, { @@ -30,12 +41,24 @@ "coverage": "regular", "badge-label": 53, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "53-1-D" }, { "key": "53-0-N" }] + "variants": [ + { + "key": "53-1-D" + }, + { + "key": "53-0-N" + } + ] }, { "key": 54, @@ -47,15 +70,26 @@ "coverage": "express", "badge-label": 54, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "54-1-D" }, - { "key": "54-0-A" }, - { "key": "54-0-S" } + { + "key": "54-1-D" + }, + { + "key": "54-0-A" + }, + { + "key": "54-0-S" + } ] }, { @@ -68,18 +102,35 @@ "coverage": "regular", "badge-label": 55, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "55-1-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-*" }, - { "key": "55-0-D" } + { + "key": "55-1-D" + }, + { + "key": "55-0-M" + }, + { + "key": "55-1-M" + }, + { + "key": "55-1-##" + }, + { + "key": "55-1-*" + }, + { + "key": "55-0-D" + } ] }, { @@ -92,15 +143,26 @@ "coverage": "express", "badge-label": 59, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "59-0-I" }, - { "key": "59-0-A" }, - { "key": "59-1-D" } + { + "key": "59-0-I" + }, + { + "key": "59-0-A" + }, + { + "key": "59-1-D" + } ] }, { @@ -113,16 +175,29 @@ "coverage": "regular", "badge-label": 14, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" }, - { "key": "14-0-P" } + { + "key": "14-0-D" + }, + { + "key": "14-1-E" + }, + { + "key": "14-1-##" + }, + { + "key": "14-0-P" + } ] }, { @@ -135,12 +210,24 @@ "coverage": "express", "badge-label": 57, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "57-1-D" }, { "key": "57-0-S" }] + "variants": [ + { + "key": "57-1-D" + }, + { + "key": "57-0-S" + } + ] }, { "key": 68, @@ -152,15 +239,26 @@ "coverage": "regular", "badge-label": 68, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "68-0-R" }, - { "key": "68-1-#" }, - { "key": "68-1-D" } + { + "key": "68-0-R" + }, + { + "key": "68-1-#" + }, + { + "key": "68-1-D" + } ] }, { @@ -173,20 +271,41 @@ "coverage": "regular", "badge-label": 19, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-1-N" }, - { "key": "19-0-N" }, - { "key": "19-0-#" }, - { "key": "19-1-#" } + { + "key": "19-1-A" + }, + { + "key": "19-0-L" + }, + { + "key": "19-0-E" + }, + { + "key": "19-1-D" + }, + { + "key": "19-1-N" + }, + { + "key": "19-0-N" + }, + { + "key": "19-0-#" + }, + { + "key": "19-1-#" + } ] }, { @@ -199,18 +318,31 @@ "coverage": "regular", "badge-label": 47, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "47-1-#" }, - { "key": "47-0-K" }, - { "key": "47-1-U" }, - { "key": "47-0-R" } + { + "key": "47-1-#" + }, + { + "key": "47-0-K" + }, + { + "key": "47-1-U" + }, + { + "key": "47-0-R" + } ] } ], - "query-time": "2025-06-03T18:50:45" + "query-time": "2025-06-03T18:56:26" } diff --git a/tests/fixtures/stops/routes/stop_10639.json b/tests/fixtures/stops/routes/stop_10639.json index fd3c9b1..ef55e5c 100644 --- a/tests/fixtures/stops/routes/stop_10639.json +++ b/tests/fixtures/stops/routes/stop_10639.json @@ -9,15 +9,26 @@ "coverage": "rapid transit", "badge-label": "B", "badge-style": { - "class-names": { "class-name": ["badge-label", "rapid-transit"] }, + "class-names": { + "class-name": [ + "badge-label", + "rapid-transit" + ] + }, "background-color": "#0060a9", "border-color": "#0060a9", "color": "#ffffff" }, "variants": [ - { "key": "BLUE-1-D" }, - { "key": "BLUE-0-U" }, - { "key": "BLUE-0-S" } + { + "key": "BLUE-1-D" + }, + { + "key": "BLUE-0-U" + }, + { + "key": "BLUE-0-S" + } ] }, { @@ -30,12 +41,24 @@ "coverage": "regular", "badge-label": 53, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "53-1-D" }, { "key": "53-0-N" }] + "variants": [ + { + "key": "53-1-D" + }, + { + "key": "53-0-N" + } + ] }, { "key": 54, @@ -47,15 +70,26 @@ "coverage": "express", "badge-label": 54, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "54-1-D" }, - { "key": "54-0-A" }, - { "key": "54-0-S" } + { + "key": "54-1-D" + }, + { + "key": "54-0-A" + }, + { + "key": "54-0-S" + } ] }, { @@ -68,18 +102,35 @@ "coverage": "regular", "badge-label": 55, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "55-1-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-*" }, - { "key": "55-0-D" } + { + "key": "55-1-D" + }, + { + "key": "55-0-M" + }, + { + "key": "55-1-M" + }, + { + "key": "55-1-##" + }, + { + "key": "55-1-*" + }, + { + "key": "55-0-D" + } ] }, { @@ -92,15 +143,26 @@ "coverage": "express", "badge-label": 59, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "59-0-I" }, - { "key": "59-0-A" }, - { "key": "59-1-D" } + { + "key": "59-0-I" + }, + { + "key": "59-0-A" + }, + { + "key": "59-1-D" + } ] }, { @@ -113,12 +175,24 @@ "coverage": "super express", "badge-label": 34, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + "variants": [ + { + "key": "34-0-M" + }, + { + "key": "34-1-D" + } + ] }, { "key": 14, @@ -130,16 +204,29 @@ "coverage": "regular", "badge-label": 14, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" }, - { "key": "14-0-P" } + { + "key": "14-0-D" + }, + { + "key": "14-1-E" + }, + { + "key": "14-1-##" + }, + { + "key": "14-0-P" + } ] }, { @@ -152,12 +239,24 @@ "coverage": "express", "badge-label": 57, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "57-1-D" }, { "key": "57-0-S" }] + "variants": [ + { + "key": "57-1-D" + }, + { + "key": "57-0-S" + } + ] }, { "key": 68, @@ -169,15 +268,26 @@ "coverage": "regular", "badge-label": 68, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "68-0-R" }, - { "key": "68-1-#" }, - { "key": "68-1-D" } + { + "key": "68-0-R" + }, + { + "key": "68-1-#" + }, + { + "key": "68-1-D" + } ] }, { @@ -190,20 +300,41 @@ "coverage": "regular", "badge-label": 19, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-1-N" }, - { "key": "19-0-N" }, - { "key": "19-0-#" }, - { "key": "19-1-#" } + { + "key": "19-1-A" + }, + { + "key": "19-0-L" + }, + { + "key": "19-0-E" + }, + { + "key": "19-1-D" + }, + { + "key": "19-1-N" + }, + { + "key": "19-0-N" + }, + { + "key": "19-0-#" + }, + { + "key": "19-1-#" + } ] }, { @@ -216,18 +347,31 @@ "coverage": "regular", "badge-label": 47, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "47-1-#" }, - { "key": "47-0-K" }, - { "key": "47-1-U" }, - { "key": "47-0-R" } + { + "key": "47-1-#" + }, + { + "key": "47-0-K" + }, + { + "key": "47-1-U" + }, + { + "key": "47-0-R" + } ] } ], - "query-time": "2025-06-03T18:50:53" + "query-time": "2025-06-03T18:56:32" } diff --git a/tests/fixtures/stops/routes/stop_10641.json b/tests/fixtures/stops/routes/stop_10641.json index 10fcc1f..2f38741 100644 --- a/tests/fixtures/stops/routes/stop_10641.json +++ b/tests/fixtures/stops/routes/stop_10641.json @@ -9,15 +9,26 @@ "coverage": "rapid transit", "badge-label": "B", "badge-style": { - "class-names": { "class-name": ["badge-label", "rapid-transit"] }, + "class-names": { + "class-name": [ + "badge-label", + "rapid-transit" + ] + }, "background-color": "#0060a9", "border-color": "#0060a9", "color": "#ffffff" }, "variants": [ - { "key": "BLUE-1-D" }, - { "key": "BLUE-0-U" }, - { "key": "BLUE-0-S" } + { + "key": "BLUE-1-D" + }, + { + "key": "BLUE-0-U" + }, + { + "key": "BLUE-0-S" + } ] }, { @@ -30,12 +41,24 @@ "coverage": "regular", "badge-label": 53, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "53-1-D" }, { "key": "53-0-N" }] + "variants": [ + { + "key": "53-1-D" + }, + { + "key": "53-0-N" + } + ] }, { "key": 54, @@ -47,15 +70,26 @@ "coverage": "express", "badge-label": 54, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "54-1-D" }, - { "key": "54-0-A" }, - { "key": "54-0-S" } + { + "key": "54-1-D" + }, + { + "key": "54-0-A" + }, + { + "key": "54-0-S" + } ] }, { @@ -68,18 +102,35 @@ "coverage": "regular", "badge-label": 55, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "55-1-D" }, - { "key": "55-0-M" }, - { "key": "55-1-M" }, - { "key": "55-1-##" }, - { "key": "55-1-*" }, - { "key": "55-0-D" } + { + "key": "55-1-D" + }, + { + "key": "55-0-M" + }, + { + "key": "55-1-M" + }, + { + "key": "55-1-##" + }, + { + "key": "55-1-*" + }, + { + "key": "55-0-D" + } ] }, { @@ -92,15 +143,26 @@ "coverage": "express", "badge-label": 59, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, "variants": [ - { "key": "59-0-I" }, - { "key": "59-0-A" }, - { "key": "59-1-D" } + { + "key": "59-0-I" + }, + { + "key": "59-0-A" + }, + { + "key": "59-1-D" + } ] }, { @@ -113,16 +175,29 @@ "coverage": "regular", "badge-label": 14, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" }, - { "key": "14-0-P" } + { + "key": "14-0-D" + }, + { + "key": "14-1-E" + }, + { + "key": "14-1-##" + }, + { + "key": "14-0-P" + } ] }, { @@ -135,12 +210,24 @@ "coverage": "express", "badge-label": 57, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "57-1-D" }, { "key": "57-0-S" }] + "variants": [ + { + "key": "57-1-D" + }, + { + "key": "57-0-S" + } + ] }, { "key": 68, @@ -152,15 +239,26 @@ "coverage": "regular", "badge-label": 68, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "68-0-R" }, - { "key": "68-1-#" }, - { "key": "68-1-D" } + { + "key": "68-0-R" + }, + { + "key": "68-1-#" + }, + { + "key": "68-1-D" + } ] }, { @@ -173,12 +271,24 @@ "coverage": "regular", "badge-label": 23, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] + "variants": [ + { + "key": "23-1-C" + }, + { + "key": "23-0-A" + } + ] }, { "key": 65, @@ -190,12 +300,24 @@ "coverage": "express", "badge-label": 65, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + "variants": [ + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } + ] }, { "key": 66, @@ -207,17 +329,32 @@ "coverage": "regular", "badge-label": 66, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-1-K" }, - { "key": "66-0-U" }, - { "key": "66-0-C" } + { + "key": "66-1-D" + }, + { + "key": "66-0-P" + }, + { + "key": "66-1-K" + }, + { + "key": "66-0-U" + }, + { + "key": "66-0-C" + } ] }, { @@ -230,20 +367,41 @@ "coverage": "regular", "badge-label": 19, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "19-1-A" }, - { "key": "19-0-L" }, - { "key": "19-0-E" }, - { "key": "19-1-D" }, - { "key": "19-1-N" }, - { "key": "19-0-N" }, - { "key": "19-0-#" }, - { "key": "19-1-#" } + { + "key": "19-1-A" + }, + { + "key": "19-0-L" + }, + { + "key": "19-0-E" + }, + { + "key": "19-1-D" + }, + { + "key": "19-1-N" + }, + { + "key": "19-0-N" + }, + { + "key": "19-0-#" + }, + { + "key": "19-1-#" + } ] }, { @@ -256,18 +414,31 @@ "coverage": "regular", "badge-label": 47, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "47-1-#" }, - { "key": "47-0-K" }, - { "key": "47-1-U" }, - { "key": "47-0-R" } + { + "key": "47-1-#" + }, + { + "key": "47-0-K" + }, + { + "key": "47-1-U" + }, + { + "key": "47-0-R" + } ] } ], - "query-time": "2025-06-03T18:50:46" + "query-time": "2025-06-03T18:56:27" } diff --git a/tests/fixtures/stops/routes/stop_10642.json b/tests/fixtures/stops/routes/stop_10642.json index fb1d88f..79caeec 100644 --- a/tests/fixtures/stops/routes/stop_10642.json +++ b/tests/fixtures/stops/routes/stop_10642.json @@ -1 +1,4 @@ -{ "routes": [], "query-time": "2025-06-03T18:50:47" } +{ + "routes": [], + "query-time": "2025-06-03T18:56:28" +} diff --git a/tests/fixtures/stops/routes/stop_10651.json b/tests/fixtures/stops/routes/stop_10651.json index 433d659..fd9ef36 100644 --- a/tests/fixtures/stops/routes/stop_10651.json +++ b/tests/fixtures/stops/routes/stop_10651.json @@ -10,12 +10,24 @@ "coverage": "express", "badge-label": 65, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + "variants": [ + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } + ] }, { "key": 66, @@ -27,19 +39,34 @@ "coverage": "regular", "badge-label": 66, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-1-K" }, - { "key": "66-0-U" }, - { "key": "66-0-C" } + { + "key": "66-1-D" + }, + { + "key": "66-0-P" + }, + { + "key": "66-1-K" + }, + { + "key": "66-0-U" + }, + { + "key": "66-0-C" + } ] } ], - "query-time": "2025-06-03T18:50:55" + "query-time": "2025-06-03T18:56:35" } diff --git a/tests/fixtures/stops/routes/stop_10652.json b/tests/fixtures/stops/routes/stop_10652.json index d8d08a4..224c930 100644 --- a/tests/fixtures/stops/routes/stop_10652.json +++ b/tests/fixtures/stops/routes/stop_10652.json @@ -10,12 +10,24 @@ "coverage": "express", "badge-label": 65, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + "variants": [ + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } + ] }, { "key": 66, @@ -27,19 +39,34 @@ "coverage": "regular", "badge-label": 66, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-1-K" }, - { "key": "66-0-U" }, - { "key": "66-0-C" } + { + "key": "66-1-D" + }, + { + "key": "66-0-P" + }, + { + "key": "66-1-K" + }, + { + "key": "66-0-U" + }, + { + "key": "66-0-C" + } ] } ], - "query-time": "2025-06-03T18:51:00" + "query-time": "2025-06-03T18:56:42" } diff --git a/tests/fixtures/stops/routes/stop_10672.json b/tests/fixtures/stops/routes/stop_10672.json index d8d08a4..3037315 100644 --- a/tests/fixtures/stops/routes/stop_10672.json +++ b/tests/fixtures/stops/routes/stop_10672.json @@ -10,12 +10,24 @@ "coverage": "express", "badge-label": 65, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + "variants": [ + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } + ] }, { "key": 66, @@ -27,19 +39,34 @@ "coverage": "regular", "badge-label": 66, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-1-K" }, - { "key": "66-0-U" }, - { "key": "66-0-C" } + { + "key": "66-1-D" + }, + { + "key": "66-0-P" + }, + { + "key": "66-1-K" + }, + { + "key": "66-0-U" + }, + { + "key": "66-0-C" + } ] } ], - "query-time": "2025-06-03T18:51:00" + "query-time": "2025-06-03T18:56:41" } diff --git a/tests/fixtures/stops/routes/stop_10675.json b/tests/fixtures/stops/routes/stop_10675.json index bec9a44..a7d8fe8 100644 --- a/tests/fixtures/stops/routes/stop_10675.json +++ b/tests/fixtures/stops/routes/stop_10675.json @@ -1 +1,4 @@ -{ "routes": [], "query-time": "2025-06-03T18:50:56" } +{ + "routes": [], + "query-time": "2025-06-03T18:56:37" +} diff --git a/tests/fixtures/stops/routes/stop_10803.json b/tests/fixtures/stops/routes/stop_10803.json index 71883a8..b3bd342 100644 --- a/tests/fixtures/stops/routes/stop_10803.json +++ b/tests/fixtures/stops/routes/stop_10803.json @@ -10,12 +10,24 @@ "coverage": "regular", "badge-label": 38, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] + "variants": [ + { + "key": "38-1-F" + }, + { + "key": "38-0-T" + } + ] }, { "key": 43, @@ -27,12 +39,24 @@ "coverage": "regular", "badge-label": 43, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "43-0-K" }, { "key": "43-1-D" }] + "variants": [ + { + "key": "43-0-K" + }, + { + "key": "43-1-D" + } + ] }, { "key": 49, @@ -44,15 +68,26 @@ "coverage": "regular", "badge-label": 49, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "49-0-S" }, - { "key": "49-1-D" }, - { "key": "49-0-T" } + { + "key": "49-0-S" + }, + { + "key": "49-1-D" + }, + { + "key": "49-0-T" + } ] }, { @@ -65,16 +100,29 @@ "coverage": "regular", "badge-label": 50, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "50-1-D" }, - { "key": "50-1-W" }, - { "key": "50-0-S" }, - { "key": "50-1-*" } + { + "key": "50-1-D" + }, + { + "key": "50-1-W" + }, + { + "key": "50-0-S" + }, + { + "key": "50-1-*" + } ] }, { @@ -87,18 +135,35 @@ "coverage": "regular", "badge-label": 10, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "10-0-SP" }, - { "key": "10-0-ST" }, - { "key": "10-1-WT" }, - { "key": "10-1-#" }, - { "key": "10-1-WP" }, - { "key": "10-1-W" } + { + "key": "10-0-SP" + }, + { + "key": "10-0-ST" + }, + { + "key": "10-1-WT" + }, + { + "key": "10-1-#" + }, + { + "key": "10-1-WP" + }, + { + "key": "10-1-W" + } ] }, { @@ -111,13 +176,25 @@ "coverage": "regular", "badge-label": 56, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "56-0-S" }, { "key": "56-1-D" }] + "variants": [ + { + "key": "56-0-S" + }, + { + "key": "56-1-D" + } + ] } ], - "query-time": "2025-06-03T18:50:57" + "query-time": "2025-06-03T18:56:37" } diff --git a/tests/fixtures/stops/routes/stop_10804.json b/tests/fixtures/stops/routes/stop_10804.json index 71883a8..8a6ec3a 100644 --- a/tests/fixtures/stops/routes/stop_10804.json +++ b/tests/fixtures/stops/routes/stop_10804.json @@ -10,12 +10,24 @@ "coverage": "regular", "badge-label": 38, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] + "variants": [ + { + "key": "38-1-F" + }, + { + "key": "38-0-T" + } + ] }, { "key": 43, @@ -27,12 +39,24 @@ "coverage": "regular", "badge-label": 43, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "43-0-K" }, { "key": "43-1-D" }] + "variants": [ + { + "key": "43-0-K" + }, + { + "key": "43-1-D" + } + ] }, { "key": 49, @@ -44,15 +68,26 @@ "coverage": "regular", "badge-label": 49, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "49-0-S" }, - { "key": "49-1-D" }, - { "key": "49-0-T" } + { + "key": "49-0-S" + }, + { + "key": "49-1-D" + }, + { + "key": "49-0-T" + } ] }, { @@ -65,16 +100,29 @@ "coverage": "regular", "badge-label": 50, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "50-1-D" }, - { "key": "50-1-W" }, - { "key": "50-0-S" }, - { "key": "50-1-*" } + { + "key": "50-1-D" + }, + { + "key": "50-1-W" + }, + { + "key": "50-0-S" + }, + { + "key": "50-1-*" + } ] }, { @@ -87,18 +135,35 @@ "coverage": "regular", "badge-label": 10, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "10-0-SP" }, - { "key": "10-0-ST" }, - { "key": "10-1-WT" }, - { "key": "10-1-#" }, - { "key": "10-1-WP" }, - { "key": "10-1-W" } + { + "key": "10-0-SP" + }, + { + "key": "10-0-ST" + }, + { + "key": "10-1-WT" + }, + { + "key": "10-1-#" + }, + { + "key": "10-1-WP" + }, + { + "key": "10-1-W" + } ] }, { @@ -111,13 +176,25 @@ "coverage": "regular", "badge-label": 56, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "56-0-S" }, { "key": "56-1-D" }] + "variants": [ + { + "key": "56-0-S" + }, + { + "key": "56-1-D" + } + ] } ], - "query-time": "2025-06-03T18:50:57" + "query-time": "2025-06-03T18:56:38" } diff --git a/tests/fixtures/stops/routes/stop_10830.json b/tests/fixtures/stops/routes/stop_10830.json index 7728bd4..be9edc0 100644 --- a/tests/fixtures/stops/routes/stop_10830.json +++ b/tests/fixtures/stops/routes/stop_10830.json @@ -10,13 +10,25 @@ "coverage": "regular", "badge-label": 23, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "23-1-C" }, { "key": "23-0-A" }] + "variants": [ + { + "key": "23-1-C" + }, + { + "key": "23-0-A" + } + ] } ], - "query-time": "2025-06-03T18:50:51" + "query-time": "2025-06-03T18:56:31" } diff --git a/tests/fixtures/stops/routes/stop_10901.json b/tests/fixtures/stops/routes/stop_10901.json index dd82b2d..47773a1 100644 --- a/tests/fixtures/stops/routes/stop_10901.json +++ b/tests/fixtures/stops/routes/stop_10901.json @@ -10,13 +10,25 @@ "coverage": "regular", "badge-label": 38, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] + "variants": [ + { + "key": "38-1-F" + }, + { + "key": "38-0-T" + } + ] } ], - "query-time": "2025-06-03T18:50:50" + "query-time": "2025-06-03T18:56:28" } diff --git a/tests/fixtures/stops/routes/stop_10902.json b/tests/fixtures/stops/routes/stop_10902.json index dd82b2d..8a60e17 100644 --- a/tests/fixtures/stops/routes/stop_10902.json +++ b/tests/fixtures/stops/routes/stop_10902.json @@ -10,13 +10,25 @@ "coverage": "regular", "badge-label": 38, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] + "variants": [ + { + "key": "38-1-F" + }, + { + "key": "38-0-T" + } + ] } ], - "query-time": "2025-06-03T18:50:50" + "query-time": "2025-06-03T18:56:29" } diff --git a/tests/fixtures/stops/routes/stop_10907.json b/tests/fixtures/stops/routes/stop_10907.json index 579fc54..1d6cada 100644 --- a/tests/fixtures/stops/routes/stop_10907.json +++ b/tests/fixtures/stops/routes/stop_10907.json @@ -10,13 +10,25 @@ "coverage": "regular", "badge-label": 38, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] + "variants": [ + { + "key": "38-1-F" + }, + { + "key": "38-0-T" + } + ] } ], - "query-time": "2025-06-03T18:50:52" + "query-time": "2025-06-03T18:56:31" } diff --git a/tests/fixtures/stops/routes/stop_10939.json b/tests/fixtures/stops/routes/stop_10939.json index 0e42bee..8a80f81 100644 --- a/tests/fixtures/stops/routes/stop_10939.json +++ b/tests/fixtures/stops/routes/stop_10939.json @@ -10,13 +10,25 @@ "coverage": "regular", "badge-label": 38, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "38-1-F" }, { "key": "38-0-T" }] + "variants": [ + { + "key": "38-1-F" + }, + { + "key": "38-0-T" + } + ] } ], - "query-time": "2025-06-03T18:50:54" + "query-time": "2025-06-03T18:56:32" } diff --git a/tests/fixtures/stops/routes/stop_11010.json b/tests/fixtures/stops/routes/stop_11010.json index 18ef4c4..34f2247 100644 --- a/tests/fixtures/stops/routes/stop_11010.json +++ b/tests/fixtures/stops/routes/stop_11010.json @@ -10,13 +10,25 @@ "coverage": "super express", "badge-label": 34, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + "variants": [ + { + "key": "34-0-M" + }, + { + "key": "34-1-D" + } + ] } ], - "query-time": "2025-06-03T18:50:47" + "query-time": "2025-06-03T18:56:28" } diff --git a/tests/fixtures/stops/routes/stop_11024.json b/tests/fixtures/stops/routes/stop_11024.json index a49e9d7..5aba8db 100644 --- a/tests/fixtures/stops/routes/stop_11024.json +++ b/tests/fixtures/stops/routes/stop_11024.json @@ -10,13 +10,25 @@ "coverage": "super express", "badge-label": 34, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + "variants": [ + { + "key": "34-0-M" + }, + { + "key": "34-1-D" + } + ] } ], - "query-time": "2025-06-03T18:50:55" + "query-time": "2025-06-03T18:56:35" } diff --git a/tests/fixtures/stops/routes/stop_11051.json b/tests/fixtures/stops/routes/stop_11051.json index dd2063b..4b1bad9 100644 --- a/tests/fixtures/stops/routes/stop_11051.json +++ b/tests/fixtures/stops/routes/stop_11051.json @@ -10,12 +10,24 @@ "coverage": "regular", "badge-label": 53, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, - "variants": [{ "key": "53-1-D" }, { "key": "53-0-N" }] + "variants": [ + { + "key": "53-1-D" + }, + { + "key": "53-0-N" + } + ] }, { "key": 47, @@ -27,18 +39,31 @@ "coverage": "regular", "badge-label": 47, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "47-1-#" }, - { "key": "47-0-K" }, - { "key": "47-1-U" }, - { "key": "47-0-R" } + { + "key": "47-1-#" + }, + { + "key": "47-0-K" + }, + { + "key": "47-1-U" + }, + { + "key": "47-0-R" + } ] } ], - "query-time": "2025-06-03T18:50:54" + "query-time": "2025-06-03T18:56:34" } diff --git a/tests/fixtures/stops/routes/stop_11052.json b/tests/fixtures/stops/routes/stop_11052.json index f18bb44..3f2bdcb 100644 --- a/tests/fixtures/stops/routes/stop_11052.json +++ b/tests/fixtures/stops/routes/stop_11052.json @@ -10,12 +10,24 @@ "coverage": "super express", "badge-label": 34, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "34-0-M" }, { "key": "34-1-D" }] + "variants": [ + { + "key": "34-0-M" + }, + { + "key": "34-1-D" + } + ] }, { "key": 65, @@ -27,12 +39,24 @@ "coverage": "express", "badge-label": 65, "badge-style": { - "class-names": { "class-name": ["badge-label", "express"] }, + "class-names": { + "class-name": [ + "badge-label", + "express" + ] + }, "background-color": "#eed700", "border-color": "#cab700", "color": "#000000" }, - "variants": [{ "key": "65-1-D" }, { "key": "65-0-R" }] + "variants": [ + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } + ] }, { "key": 66, @@ -44,19 +68,34 @@ "coverage": "regular", "badge-label": 66, "badge-style": { - "class-names": { "class-name": ["badge-label", "regular"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "color": "#000000" }, "variants": [ - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-1-K" }, - { "key": "66-0-U" }, - { "key": "66-0-C" } + { + "key": "66-1-D" + }, + { + "key": "66-0-P" + }, + { + "key": "66-1-K" + }, + { + "key": "66-0-U" + }, + { + "key": "66-0-C" + } ] } ], - "query-time": "2025-06-03T18:50:47" + "query-time": "2025-06-03T18:56:28" } From 9d78acff6f8ff4512c6a89e2f0a8c2a3f8838c1d Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Tue, 3 Jun 2025 19:15:00 -0500 Subject: [PATCH 04/13] Add locations fixtures to fetch script --- tests/fixtures/stops/fetch.sh | 10 ++++++++++ tests/fixtures/stops/locations-address.json | 10 +++++----- .../stops/locations-intersection.json | 19 +++++++++---------- tests/fixtures/stops/locations-no-stops.json | 10 +++++----- tests/fixtures/stops/locations-none.json | 2 +- tests/fixtures/stops/locations.json | 12 +++++++----- 6 files changed, 37 insertions(+), 26 deletions(-) diff --git a/tests/fixtures/stops/fetch.sh b/tests/fixtures/stops/fetch.sh index e9712a3..2b77520 100755 --- a/tests/fixtures/stops/fetch.sh +++ b/tests/fixtures/stops/fetch.sh @@ -1,5 +1,15 @@ #!/bin/bash +curl "https://api.winnipegtransit.com/v4/locations:245%20smith.json?api-key=${API_KEY}&usage=short&effective-on=$(date +%Y-%m-%d)" | jq "." > "locations-address.json" + +curl "https://api.winnipegtransit.com/v4/locations:portage%20%40%20main.json?api-key=${API_KEY}&usage=short&effective-on=$(date +%Y-%m-%d)" | jq "." > "locations-intersection.json" + +curl "https://api.winnipegtransit.com/v4/locations:assiniboia%20downs.json?api-key=${API_KEY}&usage=short&effective-on=$(date +%Y-%m-%d)" | jq "." > "locations-no-stops.json" + +curl "https://api.winnipegtransit.com/v4/locations:jortleby.json?api-key=${API_KEY}&usage=short&effective-on=$(date +%Y-%m-%d)" | jq "." > "locations-none.json" + +curl "https://api.winnipegtransit.com/v4/locations:union%20station.json?api-key=${API_KEY}&usage=short&effective-on=$(date +%Y-%m-%d)" | jq "." > "locations.json" + STOP_NUMBERS=(10625 10641 11052 11010 10642 10901 10902 10624 10830 10590 10907 10639 10939 10589 11051 10651 11024 10620 10675 10803 10804 10591 10158 10588 10672 10652 10157) for STOP_NUMBER in "${STOP_NUMBERS[@]}" diff --git a/tests/fixtures/stops/locations-address.json b/tests/fixtures/stops/locations-address.json index 7514519..c7dab7d 100644 --- a/tests/fixtures/stops/locations-address.json +++ b/tests/fixtures/stops/locations-address.json @@ -15,8 +15,8 @@ "y": 5528300 }, "geographic": { - "latitude": "49.89218", - "longitude": "-97.14084" + "latitude": 49.89218, + "longitude": -97.14084 } }, "type": "address" @@ -36,12 +36,12 @@ "y": 5532745 }, "geographic": { - "latitude": "49.9319", - "longitude": "-97.12439" + "latitude": 49.9319, + "longitude": -97.12439 } }, "type": "address" } ], - "query-time": "2024-01-12T22:43:47" + "query-time": "2025-06-03T19:13:46" } diff --git a/tests/fixtures/stops/locations-intersection.json b/tests/fixtures/stops/locations-intersection.json index cd17269..a718819 100644 --- a/tests/fixtures/stops/locations-intersection.json +++ b/tests/fixtures/stops/locations-intersection.json @@ -15,12 +15,12 @@ "centre": { "utm": { "zone": "14U", - "x": "633694.71", - "y": "5528676.7" + "x": 633694.71, + "y": 5528676.7 }, "geographic": { - "latitude": "49.89553", - "longitude": "-97.13848" + "latitude": 49.89553, + "longitude": -97.13848 } }, "type": "intersection" @@ -41,17 +41,16 @@ "centre": { "utm": { "zone": "14U", - "x": "633694.71", - "y": "5528676.7" + "x": 633694.71, + "y": 5528676.7 }, "geographic": { - "latitude": "49.89553", - "longitude": "-97.13848" + "latitude": 49.89553, + "longitude": -97.13848 } }, "type": "intersection" } ], - - "query-time": "2024-01-12T22:49:03" + "query-time": "2025-06-03T19:13:46" } diff --git a/tests/fixtures/stops/locations-no-stops.json b/tests/fixtures/stops/locations-no-stops.json index 67072a4..3783333 100644 --- a/tests/fixtures/stops/locations-no-stops.json +++ b/tests/fixtures/stops/locations-no-stops.json @@ -4,8 +4,8 @@ "key": 11556, "name": "Assiniboine Downs", "categories": [ - "Entertainment: Tourist Attractions", - "Sports and Recreation: Race Tracks" + "Sports and Recreation: Race Tracks", + "Entertainment: Tourist Attractions" ], "address": { "key": 78758, @@ -22,13 +22,13 @@ "y": 5527870 }, "geographic": { - "latitude": "49.89117", - "longitude": "-97.32834" + "latitude": 49.89117, + "longitude": -97.32834 } } }, "type": "monument" } ], - "query-time": "2024-01-13T10:27:40" + "query-time": "2025-06-03T19:13:46" } diff --git a/tests/fixtures/stops/locations-none.json b/tests/fixtures/stops/locations-none.json index a8a55d5..a9428b3 100644 --- a/tests/fixtures/stops/locations-none.json +++ b/tests/fixtures/stops/locations-none.json @@ -1,4 +1,4 @@ { "locations": [], - "query-time": "2024-01-13T10:14:31" + "query-time": "2025-06-03T19:13:46" } diff --git a/tests/fixtures/stops/locations.json b/tests/fixtures/stops/locations.json index b9f7a97..fd78af2 100644 --- a/tests/fixtures/stops/locations.json +++ b/tests/fixtures/stops/locations.json @@ -3,13 +3,15 @@ { "key": 2140, "name": "Via Rail Station (Union Station)", - "categories": ["Transportation"], + "categories": [ + "Transportation" + ], "address": { "key": 133533, "street-number": 123, "street": { "key": 2265, - "name": "Main Street", + "name": "MainSt", "type": "Street" }, "centre": { @@ -19,13 +21,13 @@ "y": 5527953 }, "geographic": { - "latitude": "49.88895", - "longitude": "-97.13424" + "latitude": 49.88895, + "longitude": -97.13424 } } }, "type": "monument" } ], - "query-time": "2024-01-11T19:58:07" + "query-time": "2025-06-03T19:13:46" } From 832137aa636f249ccb14dfde493ffe2acdb2b087 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Tue, 3 Jun 2025 20:19:58 -0500 Subject: [PATCH 05/13] Extract shared fetching code --- tests/fixtures/stops/fetch.sh | 23 ++++++++++------ tests/fixtures/stops/locations-address.json | 2 +- .../stops/locations-intersection.json | 2 +- tests/fixtures/stops/locations-no-stops.json | 2 +- tests/fixtures/stops/locations-none.json | 2 +- tests/fixtures/stops/locations.json | 2 +- tests/fixtures/stops/routes/stop_10157.json | 10 +++---- tests/fixtures/stops/routes/stop_10158.json | 16 ++++++------ tests/fixtures/stops/routes/stop_10588.json | 6 ++--- tests/fixtures/stops/routes/stop_10589.json | 10 +++---- tests/fixtures/stops/routes/stop_10590.json | 10 +++---- tests/fixtures/stops/routes/stop_10591.json | 6 ++--- tests/fixtures/stops/routes/stop_10620.json | 16 ++++++------ tests/fixtures/stops/routes/stop_10624.json | 20 +++++++------- tests/fixtures/stops/routes/stop_10625.json | 20 +++++++------- tests/fixtures/stops/routes/stop_10639.json | 22 ++++++++-------- tests/fixtures/stops/routes/stop_10641.json | 26 +++++++++---------- tests/fixtures/stops/routes/stop_10642.json | 2 +- tests/fixtures/stops/routes/stop_10651.json | 6 ++--- tests/fixtures/stops/routes/stop_10652.json | 6 ++--- tests/fixtures/stops/routes/stop_10672.json | 6 ++--- tests/fixtures/stops/routes/stop_10675.json | 2 +- tests/fixtures/stops/routes/stop_10803.json | 14 +++++----- tests/fixtures/stops/routes/stop_10804.json | 14 +++++----- tests/fixtures/stops/routes/stop_10830.json | 4 +-- tests/fixtures/stops/routes/stop_10901.json | 4 +-- tests/fixtures/stops/routes/stop_10902.json | 4 +-- tests/fixtures/stops/routes/stop_10907.json | 4 +-- tests/fixtures/stops/routes/stop_10939.json | 4 +-- tests/fixtures/stops/routes/stop_11010.json | 4 +-- tests/fixtures/stops/routes/stop_11024.json | 4 +-- tests/fixtures/stops/routes/stop_11051.json | 6 ++--- tests/fixtures/stops/routes/stop_11052.json | 8 +++--- 33 files changed, 147 insertions(+), 140 deletions(-) diff --git a/tests/fixtures/stops/fetch.sh b/tests/fixtures/stops/fetch.sh index 2b77520..2f0d049 100755 --- a/tests/fixtures/stops/fetch.sh +++ b/tests/fixtures/stops/fetch.sh @@ -1,18 +1,25 @@ #!/bin/bash -curl "https://api.winnipegtransit.com/v4/locations:245%20smith.json?api-key=${API_KEY}&usage=short&effective-on=$(date +%Y-%m-%d)" | jq "." > "locations-address.json" +BASE_URL="https://api.winnipegtransit.com/v4" +DATE_PARAM=$(date +%Y-%m-%d) -curl "https://api.winnipegtransit.com/v4/locations:portage%20%40%20main.json?api-key=${API_KEY}&usage=short&effective-on=$(date +%Y-%m-%d)" | jq "." > "locations-intersection.json" +fetch_and_format_api_response() { + local endpoint=$1 + local output_file=$2 + local extra_query_parameters=${3:-""} + + curl "${BASE_URL}/${endpoint}?api-key=${API_KEY}&usage=short&effective-on=${DATE_PARAM}${extra_query_parameters}" | jq "." > "${output_file}" +} -curl "https://api.winnipegtransit.com/v4/locations:assiniboia%20downs.json?api-key=${API_KEY}&usage=short&effective-on=$(date +%Y-%m-%d)" | jq "." > "locations-no-stops.json" - -curl "https://api.winnipegtransit.com/v4/locations:jortleby.json?api-key=${API_KEY}&usage=short&effective-on=$(date +%Y-%m-%d)" | jq "." > "locations-none.json" - -curl "https://api.winnipegtransit.com/v4/locations:union%20station.json?api-key=${API_KEY}&usage=short&effective-on=$(date +%Y-%m-%d)" | jq "." > "locations.json" +fetch_and_format_api_response "locations:245%20smith.json" "locations-address.json" +fetch_and_format_api_response "locations:portage%20%40%20main.json" "locations-intersection.json" +fetch_and_format_api_response "locations:assiniboia%20downs.json" "locations-no-stops.json" +fetch_and_format_api_response "locations:jortleby.json" "locations-none.json" +fetch_and_format_api_response "locations:union%20station.json" "locations.json" STOP_NUMBERS=(10625 10641 11052 11010 10642 10901 10902 10624 10830 10590 10907 10639 10939 10589 11051 10651 11024 10620 10675 10803 10804 10591 10158 10588 10672 10652 10157) for STOP_NUMBER in "${STOP_NUMBERS[@]}" do - curl "https://api.winnipegtransit.com/v4/routes.json?api-key=${API_KEY}&stop=${STOP_NUMBER}&effective-on=$(date +%Y-%m-%d)" | jq "." > "routes/stop_${STOP_NUMBER}.json" + fetch_and_format_api_response "routes.json" "routes/stop_${STOP_NUMBER}.json" "&stop=${STOP_NUMBER}" done \ No newline at end of file diff --git a/tests/fixtures/stops/locations-address.json b/tests/fixtures/stops/locations-address.json index c7dab7d..ac2aeef 100644 --- a/tests/fixtures/stops/locations-address.json +++ b/tests/fixtures/stops/locations-address.json @@ -43,5 +43,5 @@ "type": "address" } ], - "query-time": "2025-06-03T19:13:46" + "query-time": "2025-06-03T19:55:07" } diff --git a/tests/fixtures/stops/locations-intersection.json b/tests/fixtures/stops/locations-intersection.json index a718819..e5db01d 100644 --- a/tests/fixtures/stops/locations-intersection.json +++ b/tests/fixtures/stops/locations-intersection.json @@ -52,5 +52,5 @@ "type": "intersection" } ], - "query-time": "2025-06-03T19:13:46" + "query-time": "2025-06-03T19:55:09" } diff --git a/tests/fixtures/stops/locations-no-stops.json b/tests/fixtures/stops/locations-no-stops.json index 3783333..4b06b72 100644 --- a/tests/fixtures/stops/locations-no-stops.json +++ b/tests/fixtures/stops/locations-no-stops.json @@ -30,5 +30,5 @@ "type": "monument" } ], - "query-time": "2025-06-03T19:13:46" + "query-time": "2025-06-03T19:55:11" } diff --git a/tests/fixtures/stops/locations-none.json b/tests/fixtures/stops/locations-none.json index a9428b3..72c9017 100644 --- a/tests/fixtures/stops/locations-none.json +++ b/tests/fixtures/stops/locations-none.json @@ -1,4 +1,4 @@ { "locations": [], - "query-time": "2025-06-03T19:13:46" + "query-time": "2025-06-03T19:55:12" } diff --git a/tests/fixtures/stops/locations.json b/tests/fixtures/stops/locations.json index fd78af2..f0599ee 100644 --- a/tests/fixtures/stops/locations.json +++ b/tests/fixtures/stops/locations.json @@ -29,5 +29,5 @@ "type": "monument" } ], - "query-time": "2025-06-03T19:13:46" + "query-time": "2025-06-03T19:55:13" } diff --git a/tests/fixtures/stops/routes/stop_10157.json b/tests/fixtures/stops/routes/stop_10157.json index 45b54a4..30b9195 100644 --- a/tests/fixtures/stops/routes/stop_10157.json +++ b/tests/fixtures/stops/routes/stop_10157.json @@ -34,7 +34,7 @@ { "key": 68, "number": 68, - "name": "Route 68 Grosvenor", + "name": "Grosvenor", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -66,7 +66,7 @@ { "key": 65, "number": 65, - "name": "Route 65 Grant Express", + "name": "Grant Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -95,7 +95,7 @@ { "key": 66, "number": 66, - "name": "Route 66 Grant", + "name": "Grant", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -133,7 +133,7 @@ { "key": 47, "number": 47, - "name": "Route 47 Transcona - Pembina", + "name": "Transcona - Pembina", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -166,5 +166,5 @@ ] } ], - "query-time": "2025-06-03T18:56:42" + "query-time": "2025-06-03T19:55:54" } diff --git a/tests/fixtures/stops/routes/stop_10158.json b/tests/fixtures/stops/routes/stop_10158.json index 77fed4f..46d80de 100644 --- a/tests/fixtures/stops/routes/stop_10158.json +++ b/tests/fixtures/stops/routes/stop_10158.json @@ -3,7 +3,7 @@ { "key": 53, "number": 53, - "name": "Route 53 Norwood", + "name": "Norwood", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -32,7 +32,7 @@ { "key": 54, "number": 54, - "name": "Route 54 St. Mary's Express", + "name": "St. Mary's Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -64,7 +64,7 @@ { "key": 55, "number": 55, - "name": "Route 55 St. Anne's", + "name": "St. Anne's", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -105,7 +105,7 @@ { "key": 59, "number": 59, - "name": "Route 59 South St. Anne's Express", + "name": "South St. Anne's Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -137,7 +137,7 @@ { "key": 14, "number": 14, - "name": "Route 14 Ellice-St. Mary's", + "name": "Ellice-St. Mary's", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -172,7 +172,7 @@ { "key": 57, "number": 57, - "name": "Route 57 Southdale Express", + "name": "Southdale Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -201,7 +201,7 @@ { "key": 19, "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "name": "Marion-Logan-Notre Dame", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -246,5 +246,5 @@ ] } ], - "query-time": "2025-06-03T18:56:41" + "query-time": "2025-06-03T19:55:48" } diff --git a/tests/fixtures/stops/routes/stop_10588.json b/tests/fixtures/stops/routes/stop_10588.json index 83e7a2b..9910cd1 100644 --- a/tests/fixtures/stops/routes/stop_10588.json +++ b/tests/fixtures/stops/routes/stop_10588.json @@ -3,7 +3,7 @@ { "key": 34, "number": 34, - "name": "Route 34 McPhillips Super Express", + "name": "McPhillips Super Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -32,7 +32,7 @@ { "key": 23, "number": 23, - "name": "Route 23 Broadway - William", + "name": "Broadway - William", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -59,5 +59,5 @@ ] } ], - "query-time": "2025-06-03T18:56:41" + "query-time": "2025-06-03T19:55:50" } diff --git a/tests/fixtures/stops/routes/stop_10589.json b/tests/fixtures/stops/routes/stop_10589.json index 42bacc2..2f902a7 100644 --- a/tests/fixtures/stops/routes/stop_10589.json +++ b/tests/fixtures/stops/routes/stop_10589.json @@ -3,7 +3,7 @@ { "key": 34, "number": 34, - "name": "Route 34 McPhillips Super Express", + "name": "McPhillips Super Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -32,7 +32,7 @@ { "key": 23, "number": 23, - "name": "Route 23 Broadway - William", + "name": "Broadway - William", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -61,7 +61,7 @@ { "key": 65, "number": 65, - "name": "Route 65 Grant Express", + "name": "Grant Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -90,7 +90,7 @@ { "key": 66, "number": 66, - "name": "Route 66 Grant", + "name": "Grant", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -126,5 +126,5 @@ ] } ], - "query-time": "2025-06-03T18:56:34" + "query-time": "2025-06-03T19:55:33" } diff --git a/tests/fixtures/stops/routes/stop_10590.json b/tests/fixtures/stops/routes/stop_10590.json index 0e84182..48d2ff0 100644 --- a/tests/fixtures/stops/routes/stop_10590.json +++ b/tests/fixtures/stops/routes/stop_10590.json @@ -3,7 +3,7 @@ { "key": 34, "number": 34, - "name": "Route 34 McPhillips Super Express", + "name": "McPhillips Super Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -32,7 +32,7 @@ { "key": 23, "number": 23, - "name": "Route 23 Broadway - William", + "name": "Broadway - William", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -61,7 +61,7 @@ { "key": 65, "number": 65, - "name": "Route 65 Grant Express", + "name": "Grant Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -90,7 +90,7 @@ { "key": 66, "number": 66, - "name": "Route 66 Grant", + "name": "Grant", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -126,5 +126,5 @@ ] } ], - "query-time": "2025-06-03T18:56:31" + "query-time": "2025-06-03T19:55:27" } diff --git a/tests/fixtures/stops/routes/stop_10591.json b/tests/fixtures/stops/routes/stop_10591.json index 96a5b99..62150a2 100644 --- a/tests/fixtures/stops/routes/stop_10591.json +++ b/tests/fixtures/stops/routes/stop_10591.json @@ -3,7 +3,7 @@ { "key": 34, "number": 34, - "name": "Route 34 McPhillips Super Express", + "name": "McPhillips Super Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -32,7 +32,7 @@ { "key": 23, "number": 23, - "name": "Route 23 Broadway - William", + "name": "Broadway - William", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -59,5 +59,5 @@ ] } ], - "query-time": "2025-06-03T18:56:38" + "query-time": "2025-06-03T19:55:47" } diff --git a/tests/fixtures/stops/routes/stop_10620.json b/tests/fixtures/stops/routes/stop_10620.json index dcbfcca..cbff83c 100644 --- a/tests/fixtures/stops/routes/stop_10620.json +++ b/tests/fixtures/stops/routes/stop_10620.json @@ -3,7 +3,7 @@ { "key": 54, "number": 54, - "name": "Route 54 St. Mary's Express", + "name": "St. Mary's Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -35,7 +35,7 @@ { "key": 55, "number": 55, - "name": "Route 55 St. Anne's", + "name": "St. Anne's", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -76,7 +76,7 @@ { "key": 59, "number": 59, - "name": "Route 59 South St. Anne's Express", + "name": "South St. Anne's Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -108,7 +108,7 @@ { "key": 14, "number": 14, - "name": "Route 14 Ellice-St. Mary's", + "name": "Ellice-St. Mary's", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -143,7 +143,7 @@ { "key": 57, "number": 57, - "name": "Route 57 Southdale Express", + "name": "Southdale Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -172,7 +172,7 @@ { "key": 68, "number": 68, - "name": "Route 68 Grosvenor", + "name": "Grosvenor", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -204,7 +204,7 @@ { "key": 19, "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "name": "Marion-Logan-Notre Dame", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -249,5 +249,5 @@ ] } ], - "query-time": "2025-06-03T18:56:35" + "query-time": "2025-06-03T19:55:39" } diff --git a/tests/fixtures/stops/routes/stop_10624.json b/tests/fixtures/stops/routes/stop_10624.json index eb6f18a..d07a253 100644 --- a/tests/fixtures/stops/routes/stop_10624.json +++ b/tests/fixtures/stops/routes/stop_10624.json @@ -34,7 +34,7 @@ { "key": 53, "number": 53, - "name": "Route 53 Norwood", + "name": "Norwood", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -63,7 +63,7 @@ { "key": 54, "number": 54, - "name": "Route 54 St. Mary's Express", + "name": "St. Mary's Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -95,7 +95,7 @@ { "key": 55, "number": 55, - "name": "Route 55 St. Anne's", + "name": "St. Anne's", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -136,7 +136,7 @@ { "key": 59, "number": 59, - "name": "Route 59 South St. Anne's Express", + "name": "South St. Anne's Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -168,7 +168,7 @@ { "key": 14, "number": 14, - "name": "Route 14 Ellice-St. Mary's", + "name": "Ellice-St. Mary's", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -203,7 +203,7 @@ { "key": 57, "number": 57, - "name": "Route 57 Southdale Express", + "name": "Southdale Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -232,7 +232,7 @@ { "key": 68, "number": 68, - "name": "Route 68 Grosvenor", + "name": "Grosvenor", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -264,7 +264,7 @@ { "key": 19, "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "name": "Marion-Logan-Notre Dame", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -311,7 +311,7 @@ { "key": 47, "number": 47, - "name": "Route 47 Transcona - Pembina", + "name": "Transcona - Pembina", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -344,5 +344,5 @@ ] } ], - "query-time": "2025-06-03T18:56:30" + "query-time": "2025-06-03T19:55:23" } diff --git a/tests/fixtures/stops/routes/stop_10625.json b/tests/fixtures/stops/routes/stop_10625.json index 051508d..a1e48cc 100644 --- a/tests/fixtures/stops/routes/stop_10625.json +++ b/tests/fixtures/stops/routes/stop_10625.json @@ -34,7 +34,7 @@ { "key": 53, "number": 53, - "name": "Route 53 Norwood", + "name": "Norwood", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -63,7 +63,7 @@ { "key": 54, "number": 54, - "name": "Route 54 St. Mary's Express", + "name": "St. Mary's Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -95,7 +95,7 @@ { "key": 55, "number": 55, - "name": "Route 55 St. Anne's", + "name": "St. Anne's", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -136,7 +136,7 @@ { "key": 59, "number": 59, - "name": "Route 59 South St. Anne's Express", + "name": "South St. Anne's Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -168,7 +168,7 @@ { "key": 14, "number": 14, - "name": "Route 14 Ellice-St. Mary's", + "name": "Ellice-St. Mary's", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -203,7 +203,7 @@ { "key": 57, "number": 57, - "name": "Route 57 Southdale Express", + "name": "Southdale Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -232,7 +232,7 @@ { "key": 68, "number": 68, - "name": "Route 68 Grosvenor", + "name": "Grosvenor", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -264,7 +264,7 @@ { "key": 19, "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "name": "Marion-Logan-Notre Dame", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -311,7 +311,7 @@ { "key": 47, "number": 47, - "name": "Route 47 Transcona - Pembina", + "name": "Transcona - Pembina", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -344,5 +344,5 @@ ] } ], - "query-time": "2025-06-03T18:56:26" + "query-time": "2025-06-03T19:55:14" } diff --git a/tests/fixtures/stops/routes/stop_10639.json b/tests/fixtures/stops/routes/stop_10639.json index ef55e5c..a03d78f 100644 --- a/tests/fixtures/stops/routes/stop_10639.json +++ b/tests/fixtures/stops/routes/stop_10639.json @@ -34,7 +34,7 @@ { "key": 53, "number": 53, - "name": "Route 53 Norwood", + "name": "Norwood", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -63,7 +63,7 @@ { "key": 54, "number": 54, - "name": "Route 54 St. Mary's Express", + "name": "St. Mary's Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -95,7 +95,7 @@ { "key": 55, "number": 55, - "name": "Route 55 St. Anne's", + "name": "St. Anne's", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -136,7 +136,7 @@ { "key": 59, "number": 59, - "name": "Route 59 South St. Anne's Express", + "name": "South St. Anne's Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -168,7 +168,7 @@ { "key": 34, "number": 34, - "name": "Route 34 McPhillips Super Express", + "name": "McPhillips Super Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -197,7 +197,7 @@ { "key": 14, "number": 14, - "name": "Route 14 Ellice-St. Mary's", + "name": "Ellice-St. Mary's", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -232,7 +232,7 @@ { "key": 57, "number": 57, - "name": "Route 57 Southdale Express", + "name": "Southdale Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -261,7 +261,7 @@ { "key": 68, "number": 68, - "name": "Route 68 Grosvenor", + "name": "Grosvenor", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -293,7 +293,7 @@ { "key": 19, "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "name": "Marion-Logan-Notre Dame", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -340,7 +340,7 @@ { "key": 47, "number": 47, - "name": "Route 47 Transcona - Pembina", + "name": "Transcona - Pembina", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -373,5 +373,5 @@ ] } ], - "query-time": "2025-06-03T18:56:32" + "query-time": "2025-06-03T19:55:29" } diff --git a/tests/fixtures/stops/routes/stop_10641.json b/tests/fixtures/stops/routes/stop_10641.json index 2f38741..a9ff0ae 100644 --- a/tests/fixtures/stops/routes/stop_10641.json +++ b/tests/fixtures/stops/routes/stop_10641.json @@ -34,7 +34,7 @@ { "key": 53, "number": 53, - "name": "Route 53 Norwood", + "name": "Norwood", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -63,7 +63,7 @@ { "key": 54, "number": 54, - "name": "Route 54 St. Mary's Express", + "name": "St. Mary's Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -95,7 +95,7 @@ { "key": 55, "number": 55, - "name": "Route 55 St. Anne's", + "name": "St. Anne's", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -136,7 +136,7 @@ { "key": 59, "number": 59, - "name": "Route 59 South St. Anne's Express", + "name": "South St. Anne's Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -168,7 +168,7 @@ { "key": 14, "number": 14, - "name": "Route 14 Ellice-St. Mary's", + "name": "Ellice-St. Mary's", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -203,7 +203,7 @@ { "key": 57, "number": 57, - "name": "Route 57 Southdale Express", + "name": "Southdale Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -232,7 +232,7 @@ { "key": 68, "number": 68, - "name": "Route 68 Grosvenor", + "name": "Grosvenor", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -264,7 +264,7 @@ { "key": 23, "number": 23, - "name": "Route 23 Broadway - William", + "name": "Broadway - William", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -293,7 +293,7 @@ { "key": 65, "number": 65, - "name": "Route 65 Grant Express", + "name": "Grant Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -322,7 +322,7 @@ { "key": 66, "number": 66, - "name": "Route 66 Grant", + "name": "Grant", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -360,7 +360,7 @@ { "key": 19, "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "name": "Marion-Logan-Notre Dame", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -407,7 +407,7 @@ { "key": 47, "number": 47, - "name": "Route 47 Transcona - Pembina", + "name": "Transcona - Pembina", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -440,5 +440,5 @@ ] } ], - "query-time": "2025-06-03T18:56:27" + "query-time": "2025-06-03T19:55:16" } diff --git a/tests/fixtures/stops/routes/stop_10642.json b/tests/fixtures/stops/routes/stop_10642.json index 79caeec..43f7ab5 100644 --- a/tests/fixtures/stops/routes/stop_10642.json +++ b/tests/fixtures/stops/routes/stop_10642.json @@ -1,4 +1,4 @@ { "routes": [], - "query-time": "2025-06-03T18:56:28" + "query-time": "2025-06-03T19:55:19" } diff --git a/tests/fixtures/stops/routes/stop_10651.json b/tests/fixtures/stops/routes/stop_10651.json index fd9ef36..4454c3d 100644 --- a/tests/fixtures/stops/routes/stop_10651.json +++ b/tests/fixtures/stops/routes/stop_10651.json @@ -3,7 +3,7 @@ { "key": 65, "number": 65, - "name": "Route 65 Grant Express", + "name": "Grant Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -32,7 +32,7 @@ { "key": 66, "number": 66, - "name": "Route 66 Grant", + "name": "Grant", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -68,5 +68,5 @@ ] } ], - "query-time": "2025-06-03T18:56:35" + "query-time": "2025-06-03T19:55:35" } diff --git a/tests/fixtures/stops/routes/stop_10652.json b/tests/fixtures/stops/routes/stop_10652.json index 224c930..7509935 100644 --- a/tests/fixtures/stops/routes/stop_10652.json +++ b/tests/fixtures/stops/routes/stop_10652.json @@ -3,7 +3,7 @@ { "key": 65, "number": 65, - "name": "Route 65 Grant Express", + "name": "Grant Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -32,7 +32,7 @@ { "key": 66, "number": 66, - "name": "Route 66 Grant", + "name": "Grant", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -68,5 +68,5 @@ ] } ], - "query-time": "2025-06-03T18:56:42" + "query-time": "2025-06-03T19:55:53" } diff --git a/tests/fixtures/stops/routes/stop_10672.json b/tests/fixtures/stops/routes/stop_10672.json index 3037315..6fd0d56 100644 --- a/tests/fixtures/stops/routes/stop_10672.json +++ b/tests/fixtures/stops/routes/stop_10672.json @@ -3,7 +3,7 @@ { "key": 65, "number": 65, - "name": "Route 65 Grant Express", + "name": "Grant Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -32,7 +32,7 @@ { "key": 66, "number": 66, - "name": "Route 66 Grant", + "name": "Grant", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -68,5 +68,5 @@ ] } ], - "query-time": "2025-06-03T18:56:41" + "query-time": "2025-06-03T19:55:51" } diff --git a/tests/fixtures/stops/routes/stop_10675.json b/tests/fixtures/stops/routes/stop_10675.json index a7d8fe8..29645a3 100644 --- a/tests/fixtures/stops/routes/stop_10675.json +++ b/tests/fixtures/stops/routes/stop_10675.json @@ -1,4 +1,4 @@ { "routes": [], - "query-time": "2025-06-03T18:56:37" + "query-time": "2025-06-03T19:55:41" } diff --git a/tests/fixtures/stops/routes/stop_10803.json b/tests/fixtures/stops/routes/stop_10803.json index b3bd342..0605370 100644 --- a/tests/fixtures/stops/routes/stop_10803.json +++ b/tests/fixtures/stops/routes/stop_10803.json @@ -3,7 +3,7 @@ { "key": 38, "number": 38, - "name": "Route 38 Salter", + "name": "Salter", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -32,7 +32,7 @@ { "key": 43, "number": 43, - "name": "Route 43 Munroe", + "name": "Munroe", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -61,7 +61,7 @@ { "key": 49, "number": 49, - "name": "Route 49 Dugald", + "name": "Dugald", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -93,7 +93,7 @@ { "key": 50, "number": 50, - "name": "Route 50 Archibald", + "name": "Archibald", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -128,7 +128,7 @@ { "key": 10, "number": 10, - "name": "Route 10 St. Boniface-West Broadway", + "name": "St. Boniface-West Broadway", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -169,7 +169,7 @@ { "key": 56, "number": 56, - "name": "Route 56 St. Boniface", + "name": "St. Boniface", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -196,5 +196,5 @@ ] } ], - "query-time": "2025-06-03T18:56:37" + "query-time": "2025-06-03T19:55:43" } diff --git a/tests/fixtures/stops/routes/stop_10804.json b/tests/fixtures/stops/routes/stop_10804.json index 8a6ec3a..8545f39 100644 --- a/tests/fixtures/stops/routes/stop_10804.json +++ b/tests/fixtures/stops/routes/stop_10804.json @@ -3,7 +3,7 @@ { "key": 38, "number": 38, - "name": "Route 38 Salter", + "name": "Salter", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -32,7 +32,7 @@ { "key": 43, "number": 43, - "name": "Route 43 Munroe", + "name": "Munroe", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -61,7 +61,7 @@ { "key": 49, "number": 49, - "name": "Route 49 Dugald", + "name": "Dugald", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -93,7 +93,7 @@ { "key": 50, "number": 50, - "name": "Route 50 Archibald", + "name": "Archibald", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -128,7 +128,7 @@ { "key": 10, "number": 10, - "name": "Route 10 St. Boniface-West Broadway", + "name": "St. Boniface-West Broadway", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -169,7 +169,7 @@ { "key": 56, "number": 56, - "name": "Route 56 St. Boniface", + "name": "St. Boniface", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -196,5 +196,5 @@ ] } ], - "query-time": "2025-06-03T18:56:38" + "query-time": "2025-06-03T19:55:45" } diff --git a/tests/fixtures/stops/routes/stop_10830.json b/tests/fixtures/stops/routes/stop_10830.json index be9edc0..2c328c9 100644 --- a/tests/fixtures/stops/routes/stop_10830.json +++ b/tests/fixtures/stops/routes/stop_10830.json @@ -3,7 +3,7 @@ { "key": 23, "number": 23, - "name": "Route 23 Broadway - William", + "name": "Broadway - William", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -30,5 +30,5 @@ ] } ], - "query-time": "2025-06-03T18:56:31" + "query-time": "2025-06-03T19:55:25" } diff --git a/tests/fixtures/stops/routes/stop_10901.json b/tests/fixtures/stops/routes/stop_10901.json index 47773a1..cd8c177 100644 --- a/tests/fixtures/stops/routes/stop_10901.json +++ b/tests/fixtures/stops/routes/stop_10901.json @@ -3,7 +3,7 @@ { "key": 38, "number": 38, - "name": "Route 38 Salter", + "name": "Salter", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -30,5 +30,5 @@ ] } ], - "query-time": "2025-06-03T18:56:28" + "query-time": "2025-06-03T19:55:20" } diff --git a/tests/fixtures/stops/routes/stop_10902.json b/tests/fixtures/stops/routes/stop_10902.json index 8a60e17..e23cec1 100644 --- a/tests/fixtures/stops/routes/stop_10902.json +++ b/tests/fixtures/stops/routes/stop_10902.json @@ -3,7 +3,7 @@ { "key": 38, "number": 38, - "name": "Route 38 Salter", + "name": "Salter", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -30,5 +30,5 @@ ] } ], - "query-time": "2025-06-03T18:56:29" + "query-time": "2025-06-03T19:55:21" } diff --git a/tests/fixtures/stops/routes/stop_10907.json b/tests/fixtures/stops/routes/stop_10907.json index 1d6cada..820011b 100644 --- a/tests/fixtures/stops/routes/stop_10907.json +++ b/tests/fixtures/stops/routes/stop_10907.json @@ -3,7 +3,7 @@ { "key": 38, "number": 38, - "name": "Route 38 Salter", + "name": "Salter", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -30,5 +30,5 @@ ] } ], - "query-time": "2025-06-03T18:56:31" + "query-time": "2025-06-03T19:55:28" } diff --git a/tests/fixtures/stops/routes/stop_10939.json b/tests/fixtures/stops/routes/stop_10939.json index 8a80f81..b5e4dde 100644 --- a/tests/fixtures/stops/routes/stop_10939.json +++ b/tests/fixtures/stops/routes/stop_10939.json @@ -3,7 +3,7 @@ { "key": 38, "number": 38, - "name": "Route 38 Salter", + "name": "Salter", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -30,5 +30,5 @@ ] } ], - "query-time": "2025-06-03T18:56:32" + "query-time": "2025-06-03T19:55:31" } diff --git a/tests/fixtures/stops/routes/stop_11010.json b/tests/fixtures/stops/routes/stop_11010.json index 34f2247..81db2a2 100644 --- a/tests/fixtures/stops/routes/stop_11010.json +++ b/tests/fixtures/stops/routes/stop_11010.json @@ -3,7 +3,7 @@ { "key": 34, "number": 34, - "name": "Route 34 McPhillips Super Express", + "name": "McPhillips Super Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -30,5 +30,5 @@ ] } ], - "query-time": "2025-06-03T18:56:28" + "query-time": "2025-06-03T19:55:18" } diff --git a/tests/fixtures/stops/routes/stop_11024.json b/tests/fixtures/stops/routes/stop_11024.json index 5aba8db..56e8fcf 100644 --- a/tests/fixtures/stops/routes/stop_11024.json +++ b/tests/fixtures/stops/routes/stop_11024.json @@ -3,7 +3,7 @@ { "key": 34, "number": 34, - "name": "Route 34 McPhillips Super Express", + "name": "McPhillips Super Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -30,5 +30,5 @@ ] } ], - "query-time": "2025-06-03T18:56:35" + "query-time": "2025-06-03T19:55:37" } diff --git a/tests/fixtures/stops/routes/stop_11051.json b/tests/fixtures/stops/routes/stop_11051.json index 4b1bad9..d642e7b 100644 --- a/tests/fixtures/stops/routes/stop_11051.json +++ b/tests/fixtures/stops/routes/stop_11051.json @@ -3,7 +3,7 @@ { "key": 53, "number": 53, - "name": "Route 53 Norwood", + "name": "Norwood", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -32,7 +32,7 @@ { "key": 47, "number": 47, - "name": "Route 47 Transcona - Pembina", + "name": "Transcona - Pembina", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -65,5 +65,5 @@ ] } ], - "query-time": "2025-06-03T18:56:34" + "query-time": "2025-06-03T19:55:34" } diff --git a/tests/fixtures/stops/routes/stop_11052.json b/tests/fixtures/stops/routes/stop_11052.json index 3f2bdcb..0a9280f 100644 --- a/tests/fixtures/stops/routes/stop_11052.json +++ b/tests/fixtures/stops/routes/stop_11052.json @@ -3,7 +3,7 @@ { "key": 34, "number": 34, - "name": "Route 34 McPhillips Super Express", + "name": "McPhillips Super Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -32,7 +32,7 @@ { "key": 65, "number": 65, - "name": "Route 65 Grant Express", + "name": "Grant Express", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -61,7 +61,7 @@ { "key": 66, "number": 66, - "name": "Route 66 Grant", + "name": "Grant", "effective-from": "2025-04-13T00:00:00", "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", @@ -97,5 +97,5 @@ ] } ], - "query-time": "2025-06-03T18:56:28" + "query-time": "2025-06-03T19:55:17" } From 493b9e83202649621e5b150795919013321596fc Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Tue, 3 Jun 2025 20:37:50 -0500 Subject: [PATCH 06/13] Add stops fixtures to fetch script --- tests/fixtures/stops/fetch.sh | 3 + tests/fixtures/stops/stops-none.json | 5 +- tests/fixtures/stops/stops.json | 371 ++++++++++++++------------- 3 files changed, 203 insertions(+), 176 deletions(-) diff --git a/tests/fixtures/stops/fetch.sh b/tests/fixtures/stops/fetch.sh index 2f0d049..fca4280 100755 --- a/tests/fixtures/stops/fetch.sh +++ b/tests/fixtures/stops/fetch.sh @@ -17,6 +17,9 @@ fetch_and_format_api_response "locations:assiniboia%20downs.json" "locations-no- fetch_and_format_api_response "locations:jortleby.json" "locations-none.json" fetch_and_format_api_response "locations:union%20station.json" "locations.json" +fetch_and_format_api_response "stops.json" "stops.json" "&x=634017&y=5527953&distance=500" +fetch_and_format_api_response "stops.json" "stops-none.json" "&x=734017&y=5527953&distance=500" + STOP_NUMBERS=(10625 10641 11052 11010 10642 10901 10902 10624 10830 10590 10907 10639 10939 10589 11051 10651 11024 10620 10675 10803 10804 10591 10158 10588 10672 10652 10157) for STOP_NUMBER in "${STOP_NUMBERS[@]}" diff --git a/tests/fixtures/stops/stops-none.json b/tests/fixtures/stops/stops-none.json index 8aab41d..cca0697 100644 --- a/tests/fixtures/stops/stops-none.json +++ b/tests/fixtures/stops/stops-none.json @@ -1 +1,4 @@ -{ "stops": [], "query-time": "2024-01-13T10:25:21" } +{ + "stops": [], + "query-time": "2025-06-03T20:34:47" +} diff --git a/tests/fixtures/stops/stops.json b/tests/fixtures/stops/stops.json index bbf48b6..db4491c 100644 --- a/tests/fixtures/stops/stops.json +++ b/tests/fixtures/stops/stops.json @@ -4,6 +4,8 @@ "key": 10625, "name": "NB Main@Broadway (Union Station)", "number": 10625, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Northbound", "side": "Farside Opposite", "street": { @@ -22,20 +24,22 @@ "y": 5527987 }, "geographic": { - "latitude": "49.88927", - "longitude": "-97.13486" + "latitude": 49.88927, + "longitude": -97.13486 } }, "distances": { - "direct": "56.73" + "direct": 56.4 } }, { "key": 10641, "name": "SB Main@Broadway (Union Station)", "number": 10641, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Southbound", - "side": "Nearside", + "side": "Farside", "street": { "key": 2265, "name": "MainSt", @@ -48,22 +52,24 @@ "centre": { "utm": { "zone": "14U", - "x": 633950, - "y": 5527953 + "x": 633983, + "y": 5527876 }, "geographic": { - "latitude": "49.88897", - "longitude": "-97.13518" + "latitude": 49.88827, + "longitude": -97.13474 } }, "distances": { - "direct": "67.31" + "direct": 84.17 } }, { "key": 11052, "name": "WB Broadway@Main", "number": 11052, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Westbound", "side": "Farside", "street": { @@ -78,22 +84,24 @@ "centre": { "utm": { "zone": "14U", - "x": 633910, - "y": 5527934 + "x": 633907, + "y": 5527933 }, "geographic": { - "latitude": "49.8888", - "longitude": "-97.13574" + "latitude": 49.8888, + "longitude": -97.13578 } }, "distances": { - "direct": "108.96" + "direct": 111.8 } }, { "key": 11010, "name": "NB Fort@Broadway", "number": 11010, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Northbound", "side": "Farside", "street": { @@ -112,49 +120,20 @@ "y": 5527936 }, "geographic": { - "latitude": "49.88883", - "longitude": "-97.13632" - } - }, - "distances": { - "direct": "150.26" - } - }, - { - "key": 10642, - "name": "SB Main@Assiniboine", - "number": 10642, - "direction": "Southbound", - "side": "Nearside", - "street": { - "key": 2265, - "name": "MainSt", - "type": "Street" - }, - "cross-street": { - "key": 174, - "name": "AssiniboineAve", - "type": "Avenue" - }, - "centre": { - "utm": { - "zone": "14U", - "x": 634014, - "y": 5527789 - }, - "geographic": { - "latitude": "49.88748", - "longitude": "-97.13434" + "latitude": 49.88883, + "longitude": -97.13632 } }, "distances": { - "direct": "163.9" + "direct": 149.97 } }, { "key": 10901, "name": "SB Israel Asper@Canadian Museum for Human Rights", "number": 10901, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Southbound", "side": "Nearside", "street": { @@ -171,21 +150,23 @@ "utm": { "zone": "14U", "x": 634181, - "y": 5528050 + "y": 5528049 }, "geographic": { - "latitude": "49.88979", - "longitude": "-97.13193" + "latitude": 49.88978, + "longitude": -97.13193 } }, "distances": { - "direct": "190.34" + "direct": 190.03 } }, { "key": 10902, "name": "NB Israel Asper@Canadian Museum for Human Rights", "number": 10902, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Northbound", "side": "Farside", "street": { @@ -201,22 +182,24 @@ "centre": { "utm": { "zone": "14U", - "x": 634217, - "y": 5527991 + "x": 634220, + "y": 5527993 }, "geographic": { - "latitude": "49.88925", - "longitude": "-97.13145" + "latitude": 49.88927, + "longitude": -97.13141 } }, "distances": { - "direct": "203.3" + "direct": 206.9 } }, { "key": 10624, "name": "NB Main@Assiniboine", "number": 10624, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Northbound", "side": "Nearside Opposite", "street": { @@ -236,18 +219,20 @@ "y": 5527722 }, "geographic": { - "latitude": "49.88686", - "longitude": "-97.13349" + "latitude": 49.88686, + "longitude": -97.13349 } }, "distances": { - "direct": "238.46" + "direct": 238.67 } }, { "key": 10830, "name": "NB Fort@Assiniboine", "number": 10830, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Northbound", "side": "Farside", "street": { @@ -267,48 +252,20 @@ "y": 5527724 }, "geographic": { - "latitude": "49.88691", - "longitude": "-97.13531" + "latitude": 49.88691, + "longitude": -97.13531 } }, "distances": { - "direct": "239.72" - } - }, - { - "key": 10590, - "name": "WB Broadway@Garry", - "number": 10590, - "direction": "Westbound", - "side": "Nearside", - "street": { - "key": 519, - "name": "Broadway" - }, - "cross-street": { - "key": 1437, - "name": "GarrySt", - "type": "Street" - }, - "centre": { - "utm": { - "zone": "14U", - "x": 633786, - "y": 5527881 - }, - "geographic": { - "latitude": "49.88836", - "longitude": "-97.13748" - } - }, - "distances": { - "direct": "242.22" + "direct": 239.75 } }, { "key": 10907, "name": "EB Forks Market@The Forks Market", "number": 10907, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Eastbound", "side": "Farside Opposite", "street": { @@ -328,18 +285,20 @@ "y": 5527835 }, "geographic": { - "latitude": "49.88783", - "longitude": "-97.13071" + "latitude": 49.88783, + "longitude": -97.13071 } }, "distances": { - "direct": "282.46" + "direct": 282.8 } }, { "key": 10639, "name": "SB Main@St. Mary", "number": 10639, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Southbound", "side": "Farside", "street": { @@ -359,18 +318,20 @@ "y": 5528217 }, "geographic": { - "latitude": "49.89136", - "longitude": "-97.13643" + "latitude": 49.89136, + "longitude": -97.13643 } }, "distances": { - "direct": "311.07" + "direct": 310.79 } }, { "key": 10939, "name": "SB Israel Asper@William Stephenson", "number": 10939, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Southbound", "side": "Farside", "street": { @@ -390,27 +351,29 @@ "y": 5528250 }, "geographic": { - "latitude": "49.8916", - "longitude": "-97.13261" + "latitude": 49.8916, + "longitude": -97.13261 } }, "distances": { - "direct": "316.73" + "direct": 316.72 } }, { "key": 10589, "name": "EB Broadway@Smith", "number": 10589, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Eastbound", - "side": "Nearside", + "side": "Farside", "street": { "key": 519, "name": "Broadway" }, "cross-street": { - "key": 1437, - "name": "GarrySt", + "key": 3371, + "name": "SmithSt", "type": "Street" }, "centre": { @@ -420,18 +383,52 @@ "y": 5527827 }, "geographic": { - "latitude": "49.88788", - "longitude": "-97.13836" + "latitude": 49.88788, + "longitude": -97.13836 } }, "distances": { - "direct": "319.18" + "direct": 318.94 + } + }, + { + "key": 10590, + "name": "WB Broadway@Smith", + "number": 10590, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "direction": "Westbound", + "side": "Nearside", + "street": { + "key": 519, + "name": "Broadway" + }, + "cross-street": { + "key": 3371, + "name": "SmithSt", + "type": "Street" + }, + "centre": { + "utm": { + "zone": "14U", + "x": 633694, + "y": 5527852 + }, + "geographic": { + "latitude": 49.88812, + "longitude": -97.13877 + } + }, + "distances": { + "direct": 338.42 } }, { "key": 11051, "name": "NB Main@St. Mary", "number": 11051, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Northbound", "side": "Nearside Opposite", "street": { @@ -451,18 +448,20 @@ "y": 5528262 }, "geographic": { - "latitude": "49.89176", - "longitude": "-97.1362" + "latitude": 49.89176, + "longitude": -97.1362 } }, "distances": { - "direct": "342.87" + "direct": 342.61 } }, { "key": 10651, "name": "NB Smith@Broadway", "number": 10651, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Northbound", "side": "Farside", "street": { @@ -481,18 +480,20 @@ "y": 5527885 }, "geographic": { - "latitude": "49.88842", - "longitude": "-97.13904" + "latitude": 49.88842, + "longitude": -97.13904 } }, "distances": { - "direct": "349.95" + "direct": 349.68 } }, { "key": 11024, "name": "NB Fort@St. Mary", "number": 11024, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Northbound", "side": "Nearside", "street": { @@ -512,18 +513,20 @@ "y": 5528220 }, "geographic": { - "latitude": "49.89141", - "longitude": "-97.13773" + "latitude": 49.89141, + "longitude": -97.13773 } }, "distances": { - "direct": "370.9" + "direct": 370.59 } }, { "key": 10620, "name": "WB St Mary@Fort", "number": 10620, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Westbound", "side": "Nearside", "street": { @@ -543,18 +546,20 @@ "y": 5528255 }, "geographic": { - "latitude": "49.89172", - "longitude": "-97.13753" + "latitude": 49.89172, + "longitude": -97.13753 } }, "distances": { - "direct": "388.55" + "direct": 388.25 } }, { "key": 10675, "name": "NB Smith@Navy", "number": 10675, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Northbound", "side": "Farside", "street": { @@ -573,18 +578,20 @@ "y": 5527676 }, "geographic": { - "latitude": "49.88652", - "longitude": "-97.13821" + "latitude": 49.88652, + "longitude": -97.13821 } }, "distances": { - "direct": "392.57" + "direct": 392.45 } }, { "key": 10803, "name": "EB William Stephenson@Canadian Museum for Human Rights", "number": 10803, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Eastbound", "side": "Nearside", "street": { @@ -604,18 +611,20 @@ "y": 5528340 }, "geographic": { - "latitude": "49.89241", - "longitude": "-97.13297" + "latitude": 49.89241, + "longitude": -97.13297 } }, "distances": { - "direct": "395.66" + "direct": 395.59 } }, { "key": 10804, "name": "WB Pioneer@Canadian Museum for Human Rights", "number": 10804, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Westbound", "side": "Farside", "street": { @@ -635,48 +644,20 @@ "y": 5528354 }, "geographic": { - "latitude": "49.89253", - "longitude": "-97.13263" - } - }, - "distances": { - "direct": "414.82" - } - }, - { - "key": 10591, - "name": "WB Broadway@Donald", - "number": 10591, - "direction": "Westbound", - "side": "Nearside", - "street": { - "key": 519, - "name": "Broadway" - }, - "cross-street": { - "key": 1070, - "name": "DonaldSt", - "type": "Street" - }, - "centre": { - "utm": { - "zone": "14U", - "x": 633600, - "y": 5527811 - }, - "geographic": { - "latitude": "49.88777", - "longitude": "-97.1401" + "latitude": 49.89253, + "longitude": -97.13263 } }, "distances": { - "direct": "440.77" + "direct": 414.77 } }, { "key": 10158, "name": "NB Queen Elizabeth@Mayfair", "number": 10158, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Northbound", "side": "Nearside Opposite", "street": { @@ -696,18 +677,20 @@ "y": 5527536 }, "geographic": { - "latitude": "49.88517", - "longitude": "-97.13215" + "latitude": 49.88517, + "longitude": -97.13215 } }, "distances": { - "direct": "446.77" + "direct": 447 } }, { "key": 10588, "name": "EB Broadway@Donald", "number": 10588, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Eastbound", "side": "Nearside", "street": { @@ -726,18 +709,20 @@ "y": 5527772 }, "geographic": { - "latitude": "49.88742", - "longitude": "-97.14042" + "latitude": 49.88742, + "longitude": -97.14042 } }, "distances": { - "direct": "475.09" + "direct": 474.85 } }, { "key": 10672, "name": "SB Donald@York", "number": 10672, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Southbound", "side": "Farside", "street": { @@ -757,18 +742,20 @@ "y": 5527922 }, "geographic": { - "latitude": "49.88878", - "longitude": "-97.14098" + "latitude": 49.88878, + "longitude": -97.14098 } }, "distances": { - "direct": "484.29" + "direct": 483.99 } }, { "key": 10652, "name": "NB Smith@St. Mary", "number": 10652, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Northbound", "side": "Nearside", "street": { @@ -788,18 +775,52 @@ "y": 5528156 }, "geographic": { - "latitude": "49.89088", - "longitude": "-97.14038" + "latitude": 49.89088, + "longitude": -97.14038 + } + }, + "distances": { + "direct": 490.03 + } + }, + { + "key": 10591, + "name": "WB Broadway@Donald", + "number": 10591, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", + "direction": "Westbound", + "side": "Farside", + "street": { + "key": 519, + "name": "Broadway" + }, + "cross-street": { + "key": 1070, + "name": "DonaldSt", + "type": "Street" + }, + "centre": { + "utm": { + "zone": "14U", + "x": 633547, + "y": 5527796 + }, + "geographic": { + "latitude": 49.88764, + "longitude": -97.14084 } }, "distances": { - "direct": "490.36" + "direct": 495.53 } }, { "key": 10157, "name": "EB Mayfair@Queen Elizabeth", "number": 10157, + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "direction": "Eastbound", "side": "Nearside", "street": { @@ -819,14 +840,14 @@ "y": 5527463 }, "geographic": { - "latitude": "49.88453", - "longitude": "-97.13312" + "latitude": 49.88453, + "longitude": -97.13312 } }, "distances": { - "direct": "498.56" + "direct": 498.75 } } ], - "query-time": "2024-01-11T20:02:39" + "query-time": "2025-06-03T20:34:45" } From 48b546e7edad994ac3b567ba3909a23380a48ef8 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Tue, 3 Jun 2025 20:48:39 -0500 Subject: [PATCH 07/13] Move fixture fetch script up a level --- tests/fixtures/{stops => }/fetch.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename tests/fixtures/{stops => }/fetch.sh (57%) diff --git a/tests/fixtures/stops/fetch.sh b/tests/fixtures/fetch.sh similarity index 57% rename from tests/fixtures/stops/fetch.sh rename to tests/fixtures/fetch.sh index fca4280..d0e4939 100755 --- a/tests/fixtures/stops/fetch.sh +++ b/tests/fixtures/fetch.sh @@ -11,18 +11,18 @@ fetch_and_format_api_response() { curl "${BASE_URL}/${endpoint}?api-key=${API_KEY}&usage=short&effective-on=${DATE_PARAM}${extra_query_parameters}" | jq "." > "${output_file}" } -fetch_and_format_api_response "locations:245%20smith.json" "locations-address.json" -fetch_and_format_api_response "locations:portage%20%40%20main.json" "locations-intersection.json" -fetch_and_format_api_response "locations:assiniboia%20downs.json" "locations-no-stops.json" -fetch_and_format_api_response "locations:jortleby.json" "locations-none.json" -fetch_and_format_api_response "locations:union%20station.json" "locations.json" +fetch_and_format_api_response "locations:245%20smith.json" "stops/locations-address.json" +fetch_and_format_api_response "locations:portage%20%40%20main.json" "stops/locations-intersection.json" +fetch_and_format_api_response "locations:assiniboia%20downs.json" "stops/locations-no-stops.json" +fetch_and_format_api_response "locations:jortleby.json" "stops/locations-none.json" +fetch_and_format_api_response "locations:union%20station.json" "stops/locations.json" -fetch_and_format_api_response "stops.json" "stops.json" "&x=634017&y=5527953&distance=500" -fetch_and_format_api_response "stops.json" "stops-none.json" "&x=734017&y=5527953&distance=500" +fetch_and_format_api_response "stops.json" "stops/stops.json" "&x=634017&y=5527953&distance=500" +fetch_and_format_api_response "stops.json" "stops/stops-none.json" "&x=734017&y=5527953&distance=500" STOP_NUMBERS=(10625 10641 11052 11010 10642 10901 10902 10624 10830 10590 10907 10639 10939 10589 11051 10651 11024 10620 10675 10803 10804 10591 10158 10588 10672 10652 10157) for STOP_NUMBER in "${STOP_NUMBERS[@]}" do - fetch_and_format_api_response "routes.json" "routes/stop_${STOP_NUMBER}.json" "&stop=${STOP_NUMBER}" + fetch_and_format_api_response "routes.json" "stops/routes/stop_${STOP_NUMBER}.json" "&stop=${STOP_NUMBER}" done \ No newline at end of file From 88ff863f8e3da707e64c1ce26da50e500de3ec5c Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Tue, 3 Jun 2025 21:00:42 -0500 Subject: [PATCH 08/13] Change times fixtures manually MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I don’t want to deal with changing everything. --- tests/fixtures/times/stop_schedule.json | 4 ++-- tests/fixtures/times/stop_schedule_issue_10.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/fixtures/times/stop_schedule.json b/tests/fixtures/times/stop_schedule.json index 427f87a..e9f8553 100644 --- a/tests/fixtures/times/stop_schedule.json +++ b/tests/fixtures/times/stop_schedule.json @@ -23,8 +23,8 @@ "y": 5528122 }, "geographic": { - "latitude": "49.89071", - "longitude": "-97.149" + "latitude": 49.89071, + "longitude": -97.149 } } }, diff --git a/tests/fixtures/times/stop_schedule_issue_10.json b/tests/fixtures/times/stop_schedule_issue_10.json index b3f573a..bc05e7e 100644 --- a/tests/fixtures/times/stop_schedule_issue_10.json +++ b/tests/fixtures/times/stop_schedule_issue_10.json @@ -24,8 +24,8 @@ "y": 5528255 }, "geographic": { - "latitude": "49.89172", - "longitude": "-97.13753" + "latitude": 49.89172, + "longitude": -97.13753 } } }, @@ -52,8 +52,8 @@ "y": 5528255 }, "geographic": { - "latitude": "49.89172", - "longitude": "-97.13753" + "latitude": 49.89172, + "longitude": -97.13753 } } } From f9b9d48cc495c933bd5bfbfe829cf6109419b5b9 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Tue, 3 Jun 2025 21:05:10 -0500 Subject: [PATCH 09/13] Update geographic centre types --- src/commands/stops.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/commands/stops.rs b/src/commands/stops.rs index 76bd1b5..e39b268 100644 --- a/src/commands/stops.rs +++ b/src/commands/stops.rs @@ -1,5 +1,5 @@ use serde::Deserialize; -use serde_json::Value; +use serde_json::{Number, Value}; use sqlx::{types::Uuid, PgPool}; use crate::{commands::StopsCommand, config::Config, odws::fetch_from_odws}; @@ -131,7 +131,7 @@ pub async fn handle_stops_request( fn extract_location_details( locations_response_text: &str, -) -> Result<(String, String, String), Box> { +) -> Result<(String, Number, Number), Box> { let location_name; let latitude; let longitude; @@ -196,8 +196,8 @@ mod tests { location_name, "Via Rail Station (Union Station) (123 Main Street)" ); - assert_eq!(latitude, "49.88895"); - assert_eq!(longitude, "-97.13424"); + assert_eq!(latitude.to_string(), "49.88895"); + assert_eq!(longitude.to_string(), "-97.13424"); } #[test] @@ -210,8 +210,8 @@ mod tests { let (location_name, latitude, longitude) = result.unwrap(); assert_eq!(location_name, "245 SmithSt"); - assert_eq!(latitude, "49.89218"); - assert_eq!(longitude, "-97.14084"); + assert_eq!(latitude.to_string(), "49.89218"); + assert_eq!(longitude.to_string(), "-97.14084"); } #[test] @@ -224,8 +224,8 @@ mod tests { let (location_name, latitude, longitude) = result.unwrap(); assert_eq!(location_name, "PortageAve@MainSt"); - assert_eq!(latitude, "49.89553"); - assert_eq!(longitude, "-97.13848"); + assert_eq!(latitude.to_string(), "49.89553"); + assert_eq!(longitude.to_string(), "-97.13848"); } } @@ -249,8 +249,8 @@ struct Centre { #[derive(Deserialize)] struct Geographic { - latitude: String, - longitude: String, + latitude: Number, + longitude: Number, } #[derive(Deserialize)] From b1de27ff576428cd500db4fc4ac24d703da9a941 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Tue, 3 Jun 2025 21:06:55 -0500 Subject: [PATCH 10/13] Update response expectations to match fixtures Since I changed the fetch script to use usage=short, some of these expectations need to change. This reflects that I let the fixtures get out of date. Also, the routes at stops have changed. --- src/commands/stops.rs | 2 +- tests/stops.rs | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/commands/stops.rs b/src/commands/stops.rs index e39b268..aa64c10 100644 --- a/src/commands/stops.rs +++ b/src/commands/stops.rs @@ -194,7 +194,7 @@ mod tests { let (location_name, latitude, longitude) = result.unwrap(); assert_eq!( location_name, - "Via Rail Station (Union Station) (123 Main Street)" + "Via Rail Station (Union Station) (123 MainSt)" ); assert_eq!(latitude.to_string(), "49.88895"); assert_eq!(longitude.to_string(), "-97.13424"); diff --git a/tests/stops.rs b/tests/stops.rs index a4e54db..8604789 100644 --- a/tests/stops.rs +++ b/tests/stops.rs @@ -96,27 +96,27 @@ async fn stops_returns_stops_and_routes_near_a_location(db: PgPool) { let body = &document.find(Name("body")).next().unwrap().text(); let expected_body = indoc! {" - Stops near Via Rail Station (Union Station) (123 Main Street) - + Stops near Via Rail Station (Union Station) (123 MainSt) + 10625 NB Main@Broadway (Union Station) BLUE 14 19 47 53 54 55 57 59 68 - - 10641 SB Main@Broadway (Union Station) BLUE 14 19 34 47 53 54 55 57 59 68 - - 11052 WB Broadway@Main 65 66 - + + 10641 SB Main@Broadway (Union Station) BLUE 14 19 23 47 53 54 55 57 59 65 66 68 + + 11052 WB Broadway@Main 34 65 66 + 11010 NB Fort@Broadway 34 - - 10642 SB Main@Assiniboine BLUE 14 19 23 47 53 54 55 57 59 65 66 68 - + 10901 SB Israel Asper@Canadian Museum for Human Rights 38 - + 10902 NB Israel Asper@Canadian Museum for Human Rights 38 - + 10624 NB Main@Assiniboine BLUE 14 19 47 53 54 55 57 59 68 - + 10830 NB Fort@Assiniboine 23 - - 10590 WB Broadway@Garry 23 34 65 66 + + 10907 EB Forks Market@The Forks Market 38 + + 10639 SB Main@St. Mary BLUE 14 19 34 47 53 54 55 57 59 68 "}; assert_that(body).contains(expected_body); From ba77f488c6b8f13704df639a9c221c3f4bed542b Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Tue, 3 Jun 2025 21:52:37 -0500 Subject: [PATCH 11/13] Add effective-on parameter to requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There’s at least one failing assertion. --- Cargo.lock | 7 +++++++ Cargo.toml | 3 ++- src/commands/stops.rs | 18 ++++++++++++++---- tests/stops.rs | 9 +++++---- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 03cc555..dcd65f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -76,6 +76,12 @@ dependencies = [ "serde_json", ] +[[package]] +name = "assertables" +version = "9.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46109705783fa5733709a155971ad89cdd188d45b7e20fba7906f0d6b4f864e3" + [[package]] name = "async-channel" version = "1.9.0" @@ -2590,6 +2596,7 @@ dependencies = [ name = "textabus" version = "0.1.0" dependencies = [ + "assertables", "axum", "axum-macros", "axum-template", diff --git a/Cargo.toml b/Cargo.toml index 2e30946..c11a410 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ axum = { version = "0.7.3", features = ["macros", "query", "tokio"] } axum-macros = "0.4.0" axum-template = { version = "2.1.0", features = ["handlebars"] } base64 = "0.21" -chrono = { version = "0.4", features = ["serde"] } +chrono = { version = "0.4", features = ["clock", "serde"] } handlebars = { version = "5.0.0", features = ["dir_source"] } http = "1" indoc = "2" @@ -41,6 +41,7 @@ uuid = { version = "1", features = ["serde", "v4"] } url = { version = "2", features = ["serde"] } [dev-dependencies] +assertables = "9.5.5" select = "0.6" speculoos = "0.11" wiremock = "0.5" diff --git a/src/commands/stops.rs b/src/commands/stops.rs index aa64c10..9444c97 100644 --- a/src/commands/stops.rs +++ b/src/commands/stops.rs @@ -1,3 +1,5 @@ +use chrono::Local; + use serde::Deserialize; use serde_json::{Number, Value}; use sqlx::{types::Uuid, PgPool}; @@ -14,7 +16,12 @@ pub async fn handle_stops_request( maybe_incoming_message_id: Option, db: &PgPool, ) -> Result> { - let locations_query = format!("/v4/locations:{}.json?usage=short", command.location); + let effective_on_string = Local::now().format("%Y-%m-%d").to_string(); + + let locations_query = format!( + "/v4/locations:{}.json?usage=short&effective-on={}", + command.location, effective_on_string + ); log::trace!("locations URL: {}", locations_query); let (_locations_response_status, locations_response_text) = fetch_from_odws( @@ -33,8 +40,8 @@ pub async fn handle_stops_request( }; let stops_query = format!( - "/v4/stops.json?lat={}&lon={}&distance={}&usage=short", - latitude, longitude, STOPS_DISTANCE + "/v4/stops.json?lat={}&lon={}&distance={}&usage=short&effective-on={}", + latitude, longitude, STOPS_DISTANCE, effective_on_string ); log::trace!("stops URL: {}", stops_query); @@ -68,7 +75,10 @@ pub async fn handle_stops_request( let mut response = format!("Stops near {}\n", location_name); for stop in stops_response.stops.iter().take(MAXIMUM_STOPS_TO_RETURN) { - let routes_query = format!("/v4/routes.json?stop={}", stop.number); + let routes_query = format!( + "/v4/routes.json?stop={}&effective-on={}", + stop.number, effective_on_string + ); log::trace!("routes URL: {}", routes_query); diff --git a/tests/stops.rs b/tests/stops.rs index 8604789..c63095b 100644 --- a/tests/stops.rs +++ b/tests/stops.rs @@ -2,6 +2,7 @@ mod helpers; use helpers::get; +use assertables::assert_starts_with; use indoc::indoc; use select::{document::Document, predicate::Name}; use speculoos::prelude::*; @@ -144,7 +145,7 @@ async fn stops_returns_stops_and_routes_near_a_location(db: PgPool) { assert_eq!(locations_response.message_id, incoming_message.id); assert_eq!(locations_response.body, mock_locations_response); - assert_eq!( + assert_starts_with!( locations_response.query, format!("/v4/locations:Union Station.json?usage=short") ); @@ -155,7 +156,7 @@ async fn stops_returns_stops_and_routes_near_a_location(db: PgPool) { assert_eq!(stops_response.message_id, incoming_message.id); assert_eq!(stops_response.body, mock_stops_response); - assert_eq!( + assert_starts_with!( stops_response.query, format!("/v4/stops.json?lat=49.88895&lon=-97.13424&distance=500&usage=short") ); @@ -169,7 +170,7 @@ async fn stops_returns_stops_and_routes_near_a_location(db: PgPool) { assert_eq!(route_response.message_id, incoming_message.id); assert_eq!(route_response.body, *data); - assert_eq!(route_response.query, *path); + assert_starts_with!(route_response.query, *path); } } @@ -221,7 +222,7 @@ async fn stops_handles_an_empty_locations_response(db: PgPool) { .expect("Failed to fetch API response"); assert_eq!(api_response.body, mock_locations_response); - assert_eq!(api_response.query, "/v4/locations:acab.json?usage=short"); + assert_starts_with!(api_response.query, "/v4/locations:acab.json?usage=short"); } #[sqlx::test(fixtures("numbers-approved"))] From 7d1124cae2f7541245fea971f3c966d7c0cb5476 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Sun, 8 Jun 2025 13:06:07 -0500 Subject: [PATCH 12/13] Fix comparison of route responses Relying on the indices aligning was always a mistake. --- tests/stops.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/stops.rs b/tests/stops.rs index c63095b..b9c57cb 100644 --- a/tests/stops.rs +++ b/tests/stops.rs @@ -163,9 +163,11 @@ async fn stops_returns_stops_and_routes_near_a_location(db: PgPool) { let routes_responses: Vec<&ApiResponse> = api_responses.iter().skip(2).collect(); - for (index, (path, data, stop)) in mock_routes.iter().enumerate() { + for (path, data, stop) in mock_routes.iter() { + let stop_query_parameter = format!("stop={}", stop); let route_response = routes_responses - .get(index) + .iter() + .find(|r| r.query.contains(&stop_query_parameter)) .unwrap_or_else(|| panic!("Expected persisted route response for stop {}", stop)); assert_eq!(route_response.message_id, incoming_message.id); From ec5c4f1b1d21d5f932caac6da2bd3a30995530c6 Mon Sep 17 00:00:00 2001 From: Buck Doyle Date: Sun, 8 Jun 2025 13:13:14 -0500 Subject: [PATCH 13/13] Add changelog entry for v4 --- templates/changelog.hbs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/templates/changelog.hbs b/templates/changelog.hbs index 1539353..a0423ca 100644 --- a/templates/changelog.hbs +++ b/templates/changelog.hbs @@ -3,6 +3,18 @@ changelog +

+ 2025-06-08 +

+

+ chore +

+
    +
  • + updated to consume Winnipeg Transit’s v4 API +
  • +
+

2024-02-16