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 eedced4..9444c97 100644 --- a/src/commands/stops.rs +++ b/src/commands/stops.rs @@ -1,5 +1,7 @@ +use chrono::Local; + 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}; @@ -14,7 +16,12 @@ 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 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!( - "/v3/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!("/v3/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); @@ -131,7 +141,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; @@ -194,10 +204,10 @@ 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, "49.88895"); - assert_eq!(longitude, "-97.13424"); + assert_eq!(latitude.to_string(), "49.88895"); + assert_eq!(longitude.to_string(), "-97.13424"); } #[test] @@ -210,8 +220,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 +234,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 +259,8 @@ struct Centre { #[derive(Deserialize)] struct Geographic { - latitude: String, - longitude: String, + latitude: Number, + longitude: Number, } #[derive(Deserialize)] 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/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

diff --git a/tests/fixtures/fetch.sh b/tests/fixtures/fetch.sh new file mode 100755 index 0000000..d0e4939 --- /dev/null +++ b/tests/fixtures/fetch.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +BASE_URL="https://api.winnipegtransit.com/v4" +DATE_PARAM=$(date +%Y-%m-%d) + +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}" +} + +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/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" "stops/routes/stop_${STOP_NUMBER}.json" "&stop=${STOP_NUMBER}" +done \ No newline at end of file diff --git a/tests/fixtures/stops/fetch.sh b/tests/fixtures/stops/fetch.sh deleted file mode 100755 index d960a52..0000000 --- a/tests/fixtures/stops/fetch.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -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 -o "routes/stop_${STOP_NUMBER}.json" "https://api.winnipegtransit.com/v3/routes.json?api-key=${API_KEY}&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 7514519..ac2aeef 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:55:07" } diff --git a/tests/fixtures/stops/locations-intersection.json b/tests/fixtures/stops/locations-intersection.json index cd17269..e5db01d 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:55:09" } diff --git a/tests/fixtures/stops/locations-no-stops.json b/tests/fixtures/stops/locations-no-stops.json index 67072a4..4b06b72 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:55:11" } diff --git a/tests/fixtures/stops/locations-none.json b/tests/fixtures/stops/locations-none.json index a8a55d5..72c9017 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:55:12" } diff --git a/tests/fixtures/stops/locations.json b/tests/fixtures/stops/locations.json index b9f7a97..f0599ee 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:55:13" } diff --git a/tests/fixtures/stops/routes/stop_10157.json b/tests/fixtures/stops/routes/stop_10157.json index eecfc65..30b9195 100644 --- a/tests/fixtures/stops/routes/stop_10157.json +++ b/tests/fixtures/stops/routes/stop_10157.json @@ -1,98 +1,170 @@ { "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", + "name": "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"] }, + "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": "68-0-R" + }, + { + "key": "68-1-#" + }, + { + "key": "68-1-D" + } ] }, { - "key": 47, - "number": 47, - "name": "Route 47 Transcona - Pembina", + "key": 65, + "number": 65, + "name": "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-#" } + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } ] }, { "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", "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-0-C" }, - { "key": "66-1-K" }, - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-0-U" } + { + "key": "66-1-D" + }, + { + "key": "66-0-P" + }, + { + "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": "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-03T19:55:54" } diff --git a/tests/fixtures/stops/routes/stop_10158.json b/tests/fixtures/stops/routes/stop_10158.json index 4a73b73..46d80de 100644 --- a/tests/fixtures/stops/routes/stop_10158.json +++ b/tests/fixtures/stops/routes/stop_10158.json @@ -1,138 +1,250 @@ { "routes": [ { - "key": 19, - "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "key": 53, + "number": 53, + "name": "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"] }, + "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": "53-1-D" + }, + { + "key": "53-0-N" + } ] }, { "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", "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-0-A" }, - { "key": "54-1-D" }, - { "key": "54-0-S" } + { + "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": "St. Anne's", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "express", - "badge-label": 57, + "coverage": "regular", + "badge-label": 55, "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": "57-0-S" }, { "key": "57-1-D" }] + "variants": [ + { + "key": "55-1-D" + }, + { + "key": "55-0-M" + }, + { + "key": "55-1-M" + }, + { + "key": "55-1-##" + }, + { + "key": "55-1-*" + }, + { + "key": "55-0-D" + } + ] }, { - "key": 14, - "number": 14, - "name": "Route 14 Ellice-St. Mary's", + "key": 59, + "number": 59, + "name": "South St. Anne's Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 14, + "coverage": "express", + "badge-label": 59, "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": "14-0-P" }, - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" } + { + "key": "59-0-I" + }, + { + "key": "59-0-A" + }, + { + "key": "59-1-D" + } ] }, { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", + "key": 14, + "number": 14, + "name": "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": 53, + "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": "53-0-N" }, { "key": "53-1-D" }] + "variants": [ + { + "key": "14-0-D" + }, + { + "key": "14-1-E" + }, + { + "key": "14-1-##" + }, + { + "key": "14-0-P" + } + ] }, { - "key": 59, - "number": 59, - "name": "Route 59 South St. Anne's Express", + "key": 57, + "number": 57, + "name": "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"] }, + "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": "57-1-D" + }, + { + "key": "57-0-S" + } ] }, { - "key": 55, - "number": 55, - "name": "Route 55 St. Anne's", + "key": 19, + "number": 19, + "name": "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"] }, + "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": "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-03T19:55:48" } diff --git a/tests/fixtures/stops/routes/stop_10588.json b/tests/fixtures/stops/routes/stop_10588.json index 916a452..9910cd1 100644 --- a/tests/fixtures/stops/routes/stop_10588.json +++ b/tests/fixtures/stops/routes/stop_10588.json @@ -1,35 +1,63 @@ { "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", + "name": "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"] }, + "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, + "number": 23, + "name": "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-03T19:55:50" } diff --git a/tests/fixtures/stops/routes/stop_10589.json b/tests/fixtures/stops/routes/stop_10589.json index bdcd940..2f902a7 100644 --- a/tests/fixtures/stops/routes/stop_10589.json +++ b/tests/fixtures/stops/routes/stop_10589.json @@ -1,71 +1,130 @@ { "routes": [ { - "key": 23, - "number": 23, - "name": "Route 23 Broadway - William", + "key": 34, + "number": 34, + "name": "McPhillips Super Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 23, + "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": "23-1-C" }, { "key": "23-0-A" }] + "variants": [ + { + "key": "34-0-M" + }, + { + "key": "34-1-D" + } + ] }, { - "key": 66, - "number": 66, - "name": "Route 66 Grant", + "key": 23, + "number": 23, + "name": "Broadway - William", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 66, + "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": "66-0-C" }, - { "key": "66-1-K" }, - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-0-U" } + { + "key": "23-1-C" + }, + { + "key": "23-0-A" + } ] }, { - "key": 34, - "number": 34, - "name": "Route 34 McPhillips Super Express", + "key": 65, + "number": 65, + "name": "Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "super express", - "badge-label": 34, + "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": "34-0-M" }, { "key": "34-1-D" }] + "variants": [ + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } + ] }, { - "key": 65, - "number": 65, - "name": "Route 65 Grant Express", + "key": 66, + "number": 66, + "name": "Grant", + "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": 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": "65-0-R" }, { "key": "65-1-D" }] + "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:05" + "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 acf635f..48d2ff0 100644 --- a/tests/fixtures/stops/routes/stop_10590.json +++ b/tests/fixtures/stops/routes/stop_10590.json @@ -1,71 +1,130 @@ { "routes": [ { - "key": 23, - "number": 23, - "name": "Route 23 Broadway - William", + "key": 34, + "number": 34, + "name": "McPhillips Super Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 23, + "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": "23-1-C" }, { "key": "23-0-A" }] + "variants": [ + { + "key": "34-0-M" + }, + { + "key": "34-1-D" + } + ] }, { - "key": 66, - "number": 66, - "name": "Route 66 Grant", + "key": 23, + "number": 23, + "name": "Broadway - William", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 66, + "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": "66-0-C" }, - { "key": "66-1-K" }, - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-0-U" } + { + "key": "23-1-C" + }, + { + "key": "23-0-A" + } ] }, { - "key": 34, - "number": 34, - "name": "Route 34 McPhillips Super Express", + "key": 65, + "number": 65, + "name": "Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "super express", - "badge-label": 34, + "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": "34-0-M" }, { "key": "34-1-D" }] + "variants": [ + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } + ] }, { - "key": 65, - "number": 65, - "name": "Route 65 Grant Express", + "key": 66, + "number": 66, + "name": "Grant", + "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": 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": "65-0-R" }, { "key": "65-1-D" }] + "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:03" + "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 d51b34a..62150a2 100644 --- a/tests/fixtures/stops/routes/stop_10591.json +++ b/tests/fixtures/stops/routes/stop_10591.json @@ -1,35 +1,63 @@ { "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", + "name": "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"] }, + "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, + "number": 23, + "name": "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-03T19:55:47" } diff --git a/tests/fixtures/stops/routes/stop_10620.json b/tests/fixtures/stops/routes/stop_10620.json index f707fff..cbff83c 100644 --- a/tests/fixtures/stops/routes/stop_10620.json +++ b/tests/fixtures/stops/routes/stop_10620.json @@ -1,142 +1,253 @@ { "routes": [ { - "key": 19, - "number": 19, - "name": "Route 19 Marion-Logan-Notre Dame", + "key": 54, + "number": 54, + "name": "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": "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"] }, + "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": "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": "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"] }, + "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": "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", + "name": "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, "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-P" }, - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" } + { + "key": "14-0-D" + }, + { + "key": "14-1-E" + }, + { + "key": "14-1-##" + }, + { + "key": "14-0-P" + } ] }, { - "key": 59, - "number": 59, - "name": "Route 59 South St. Anne's Express", + "key": 57, + "number": 57, + "name": "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"] }, + "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": "57-1-D" + }, + { + "key": "57-0-S" + } ] }, { - "key": 55, - "number": 55, - "name": "Route 55 St. Anne's", + "key": 68, + "number": 68, + "name": "Grosvenor", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 55, + "badge-label": 68, + "badge-style": { + "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": 19, + "number": 19, + "name": "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": 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": "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-03T19:55:39" } diff --git a/tests/fixtures/stops/routes/stop_10624.json b/tests/fixtures/stops/routes/stop_10624.json index 7955948..d07a253 100644 --- a/tests/fixtures/stops/routes/stop_10624.json +++ b/tests/fixtures/stops/routes/stop_10624.json @@ -1,195 +1,348 @@ { "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": "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"] }, + "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": "53-1-D" + }, + { + "key": "53-0-N" + } ] }, { "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", "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-0-A" }, - { "key": "54-1-D" }, - { "key": "54-0-S" } + { + "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": "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"] }, + "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": "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": "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"] }, + "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", + "name": "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, "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-P" }, - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" } + { + "key": "14-0-D" + }, + { + "key": "14-1-E" + }, + { + "key": "14-1-##" + }, + { + "key": "14-0-P" + } ] }, { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", + "key": 57, + "number": 57, + "name": "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": "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": "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"] }, + "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": "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": "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-03T19:55:23" } diff --git a/tests/fixtures/stops/routes/stop_10625.json b/tests/fixtures/stops/routes/stop_10625.json index 329c296..a1e48cc 100644 --- a/tests/fixtures/stops/routes/stop_10625.json +++ b/tests/fixtures/stops/routes/stop_10625.json @@ -1,195 +1,348 @@ { "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": "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"] }, + "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": "53-1-D" + }, + { + "key": "53-0-N" + } ] }, { "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", "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-0-A" }, - { "key": "54-1-D" }, - { "key": "54-0-S" } + { + "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": "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"] }, + "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": "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": "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"] }, + "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", + "name": "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, "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-P" }, - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" } + { + "key": "14-0-D" + }, + { + "key": "14-1-E" + }, + { + "key": "14-1-##" + }, + { + "key": "14-0-P" + } ] }, { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", + "key": 57, + "number": 57, + "name": "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": "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": "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"] }, + "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": "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": "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-03T19:55:14" } diff --git a/tests/fixtures/stops/routes/stop_10639.json b/tests/fixtures/stops/routes/stop_10639.json index 6d17c66..a03d78f 100644 --- a/tests/fixtures/stops/routes/stop_10639.json +++ b/tests/fixtures/stops/routes/stop_10639.json @@ -1,210 +1,377 @@ { "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": "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"] }, + "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": "53-1-D" + }, + { + "key": "53-0-N" + } ] }, { "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", "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-0-A" }, - { "key": "54-1-D" }, - { "key": "54-0-S" } + { + "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": "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"] }, + "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": "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": "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"] }, + "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", + "key": 34, + "number": 34, + "name": "McPhillips Super Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 14, + "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": "14-0-P" }, - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" } + { + "key": "34-0-M" + }, + { + "key": "34-1-D" + } ] }, { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", + "key": 14, + "number": 14, + "name": "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": 53, + "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": "53-0-N" }, { "key": "53-1-D" }] + "variants": [ + { + "key": "14-0-D" + }, + { + "key": "14-1-E" + }, + { + "key": "14-1-##" + }, + { + "key": "14-0-P" + } + ] }, { - "key": 59, - "number": 59, - "name": "Route 59 South St. Anne's Express", + "key": 57, + "number": 57, + "name": "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"] }, + "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": "57-1-D" + }, + { + "key": "57-0-S" + } ] }, { - "key": 34, - "number": 34, - "name": "Route 34 McPhillips Super Express", + "key": 68, + "number": 68, + "name": "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": "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"] }, + "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": "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": "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-03T19:55:29" } diff --git a/tests/fixtures/stops/routes/stop_10641.json b/tests/fixtures/stops/routes/stop_10641.json index ba4681a..a9ff0ae 100644 --- a/tests/fixtures/stops/routes/stop_10641.json +++ b/tests/fixtures/stops/routes/stop_10641.json @@ -1,210 +1,444 @@ { "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": "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": 53, + "number": 53, + "name": "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"] }, + "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": "53-1-D" + }, + { + "key": "53-0-N" + } ] }, { - "key": 68, - "number": 68, - "name": "Route 68 Grosvenor", + "key": 54, + "number": 54, + "name": "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, + "badge-style": { + "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": 55, + "number": 55, + "name": "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"] }, + "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": "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": "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"] }, + "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": "59-0-I" + }, + { + "key": "59-0-A" + }, + { + "key": "59-1-D" + } ] }, { - "key": 47, - "number": 47, - "name": "Route 47 Transcona - Pembina", + "key": 14, + "number": 14, + "name": "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": 47, + "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": "47-0-K" }, - { "key": "47-0-R" }, - { "key": "47-1-U" }, - { "key": "47-1-#" } + { + "key": "14-0-D" + }, + { + "key": "14-1-E" + }, + { + "key": "14-1-##" + }, + { + "key": "14-0-P" + } ] }, { "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", "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-0-S" }, { "key": "57-1-D" }] + "variants": [ + { + "key": "57-1-D" + }, + { + "key": "57-0-S" + } + ] }, { - "key": 14, - "number": 14, - "name": "Route 14 Ellice-St. Mary's", + "key": 68, + "number": 68, + "name": "Grosvenor", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 14, + "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": "14-0-P" }, - { "key": "14-0-D" }, - { "key": "14-1-E" }, - { "key": "14-1-##" } + { + "key": "68-0-R" + }, + { + "key": "68-1-#" + }, + { + "key": "68-1-D" + } ] }, { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", + "key": 23, + "number": 23, + "name": "Broadway - William", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "coverage": "regular", - "badge-label": 53, + "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": "53-0-N" }, { "key": "53-1-D" }] + "variants": [ + { + "key": "23-1-C" + }, + { + "key": "23-0-A" + } + ] }, { - "key": 59, - "number": 59, - "name": "Route 59 South St. Anne's Express", + "key": 65, + "number": 65, + "name": "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"] }, + "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": "65-1-D" + }, + { + "key": "65-0-R" + } ] }, { - "key": 34, - "number": 34, - "name": "Route 34 McPhillips Super Express", + "key": 66, + "number": 66, + "name": "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": "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"] }, + "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": "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": "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-03T19:55:16" } diff --git a/tests/fixtures/stops/routes/stop_10642.json b/tests/fixtures/stops/routes/stop_10642.json index 043c0d1..43f7ab5 100644 --- a/tests/fixtures/stops/routes/stop_10642.json +++ b/tests/fixtures/stops/routes/stop_10642.json @@ -1,246 +1,4 @@ { - "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-03T19:55:19" } diff --git a/tests/fixtures/stops/routes/stop_10651.json b/tests/fixtures/stops/routes/stop_10651.json index 77466c4..4454c3d 100644 --- a/tests/fixtures/stops/routes/stop_10651.json +++ b/tests/fixtures/stops/routes/stop_10651.json @@ -1,41 +1,72 @@ { "routes": [ { - "key": 66, - "number": 66, - "name": "Route 66 Grant", + "key": 65, + "number": 65, + "name": "Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 66, + "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": "66-0-C" }, - { "key": "66-1-K" }, - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-0-U" } + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } ] }, { - "key": 65, - "number": 65, - "name": "Route 65 Grant Express", + "key": 66, + "number": 66, + "name": "Grant", + "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": 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": "65-0-R" }, { "key": "65-1-D" }] + "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:05" + "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 8856120..7509935 100644 --- a/tests/fixtures/stops/routes/stop_10652.json +++ b/tests/fixtures/stops/routes/stop_10652.json @@ -1,41 +1,72 @@ { "routes": [ { - "key": 66, - "number": 66, - "name": "Route 66 Grant", + "key": 65, + "number": 65, + "name": "Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 66, + "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": "66-0-C" }, - { "key": "66-1-K" }, - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-0-U" } + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } ] }, { - "key": 65, - "number": 65, - "name": "Route 65 Grant Express", + "key": 66, + "number": 66, + "name": "Grant", + "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": 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": "65-0-R" }, { "key": "65-1-D" }] + "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:10" + "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 2c70178..6fd0d56 100644 --- a/tests/fixtures/stops/routes/stop_10672.json +++ b/tests/fixtures/stops/routes/stop_10672.json @@ -1,41 +1,72 @@ { "routes": [ { - "key": 66, - "number": 66, - "name": "Route 66 Grant", + "key": 65, + "number": 65, + "name": "Grant Express", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", - "coverage": "regular", - "badge-label": 66, + "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": "66-0-C" }, - { "key": "66-1-K" }, - { "key": "66-1-D" }, - { "key": "66-0-P" }, - { "key": "66-0-U" } + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } ] }, { - "key": 65, - "number": 65, - "name": "Route 65 Grant Express", + "key": 66, + "number": 66, + "name": "Grant", + "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": 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": "65-0-R" }, { "key": "65-1-D" }] + "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:09" + "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 514fc72..29645a3 100644 --- a/tests/fixtures/stops/routes/stop_10675.json +++ b/tests/fixtures/stops/routes/stop_10675.json @@ -1 +1,4 @@ -{ "routes": [], "query-time": "2024-01-11T20:14:06" } +{ + "routes": [], + "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 f9b78d3..0605370 100644 --- a/tests/fixtures/stops/routes/stop_10803.json +++ b/tests/fixtures/stops/routes/stop_10803.json @@ -1,111 +1,200 @@ { "routes": [ { - "key": 50, - "number": 50, - "name": "Route 50 Archibald", + "key": 38, + "number": 38, + "name": "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"] }, + "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" } + { + "key": "38-1-F" + }, + { + "key": "38-0-T" + } ] }, { "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", "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-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": "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"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "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": "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"] }, + "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": "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"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "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", + "name": "St. Boniface", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "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": "2024-01-11T20:14:07" + "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 f9b78d3..8545f39 100644 --- a/tests/fixtures/stops/routes/stop_10804.json +++ b/tests/fixtures/stops/routes/stop_10804.json @@ -1,111 +1,200 @@ { "routes": [ { - "key": 50, - "number": 50, - "name": "Route 50 Archibald", + "key": 38, + "number": 38, + "name": "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"] }, + "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" } + { + "key": "38-1-F" + }, + { + "key": "38-0-T" + } ] }, { "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", "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-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": "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"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "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": "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"] }, + "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": "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"] }, + "class-names": { + "class-name": [ + "badge-label", + "regular" + ] + }, "background-color": "#ffffff", "border-color": "#d9d9d9", "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", + "name": "St. Boniface", + "effective-from": "2025-04-13T00:00:00", + "effective-to": "2025-06-29T02:59:59", "customer-type": "regular", "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": "2024-01-11T20:14:07" + "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 430bf01..2c328c9 100644 --- a/tests/fixtures/stops/routes/stop_10830.json +++ b/tests/fixtures/stops/routes/stop_10830.json @@ -3,18 +3,32 @@ { "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", "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": "2024-01-11T20:14:03" + "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 b686410..cd8c177 100644 --- a/tests/fixtures/stops/routes/stop_10901.json +++ b/tests/fixtures/stops/routes/stop_10901.json @@ -3,18 +3,32 @@ { "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", "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": "2024-01-11T20:14:01" + "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 19d718d..e23cec1 100644 --- a/tests/fixtures/stops/routes/stop_10902.json +++ b/tests/fixtures/stops/routes/stop_10902.json @@ -3,18 +3,32 @@ { "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", "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": "2024-01-11T20:14:02" + "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 0dbb9ad..820011b 100644 --- a/tests/fixtures/stops/routes/stop_10907.json +++ b/tests/fixtures/stops/routes/stop_10907.json @@ -3,18 +3,32 @@ { "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", "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": "2024-01-11T20:14:03" + "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 f51f432..b5e4dde 100644 --- a/tests/fixtures/stops/routes/stop_10939.json +++ b/tests/fixtures/stops/routes/stop_10939.json @@ -3,18 +3,32 @@ { "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", "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": "2024-01-11T20:14:04" + "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 9a9a337..81db2a2 100644 --- a/tests/fixtures/stops/routes/stop_11010.json +++ b/tests/fixtures/stops/routes/stop_11010.json @@ -3,18 +3,32 @@ { "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", "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": "2024-01-11T20:14:00" + "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 785e1d6..56e8fcf 100644 --- a/tests/fixtures/stops/routes/stop_11024.json +++ b/tests/fixtures/stops/routes/stop_11024.json @@ -3,18 +3,32 @@ { "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", "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": "2024-01-11T20:14:06" + "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 40d0619..d642e7b 100644 --- a/tests/fixtures/stops/routes/stop_11051.json +++ b/tests/fixtures/stops/routes/stop_11051.json @@ -1,40 +1,69 @@ { "routes": [ { - "key": 47, - "number": 47, - "name": "Route 47 Transcona - Pembina", + "key": 53, + "number": 53, + "name": "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"] }, + "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": "53-1-D" + }, + { + "key": "53-0-N" + } ] }, { - "key": 53, - "number": 53, - "name": "Route 53 Norwood", + "key": 47, + "number": 47, + "name": "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"] }, + "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-03T19:55:34" } diff --git a/tests/fixtures/stops/routes/stop_11052.json b/tests/fixtures/stops/routes/stop_11052.json index 07058d5..0a9280f 100644 --- a/tests/fixtures/stops/routes/stop_11052.json +++ b/tests/fixtures/stops/routes/stop_11052.json @@ -1,41 +1,101 @@ { "routes": [ { - "key": 66, - "number": 66, - "name": "Route 66 Grant", + "key": 34, + "number": 34, + "name": "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" } + { + "key": "34-0-M" + }, + { + "key": "34-1-D" + } ] }, { "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", "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-0-R" }, { "key": "65-1-D" }] + "variants": [ + { + "key": "65-1-D" + }, + { + "key": "65-0-R" + } + ] + }, + { + "key": 66, + "number": 66, + "name": "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-03T19:55:17" } 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" } 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 } } } diff --git a/tests/stops.rs b/tests/stops.rs index 9d444ce..b9c57cb 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::*; @@ -22,7 +23,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 +35,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 +59,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 +67,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) @@ -96,27 +97,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); @@ -144,9 +145,9 @@ 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!("/v3/locations:Union Station.json?usage=short") + format!("/v4/locations:Union Station.json?usage=short") ); let stops_response = api_responses @@ -155,21 +156,23 @@ 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!("/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(); - 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); assert_eq!(route_response.body, *data); - assert_eq!(route_response.query, *path); + assert_starts_with!(route_response.query, *path); } } @@ -181,7 +184,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 +224,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_starts_with!(api_response.query, "/v4/locations:acab.json?usage=short"); } #[sqlx::test(fixtures("numbers-approved"))] @@ -233,7 +236,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 +248,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()), )