From 0786c897260c7f180917af101ae5ea686cb60c2e Mon Sep 17 00:00:00 2001 From: Ladislav Hano Date: Sun, 26 Jan 2025 15:51:34 +0100 Subject: [PATCH] add station search by URL and UUIDs --- src/stationsearchbuilder.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/stationsearchbuilder.rs b/src/stationsearchbuilder.rs index 9e5c5e9..c78b8b4 100644 --- a/src/stationsearchbuilder.rs +++ b/src/stationsearchbuilder.rs @@ -209,4 +209,16 @@ impl StationSearchBuilder { pub async fn send(mut self) -> Result, RbError> { Ok(self.api.send("/json/stations/search", self.map).await?) } + + pub async fn byuuid(mut self, uuids: String) -> Result, RbError> { + self.map + .insert(String::from("uuids"), uuids); + Ok(self.api.send("/json/stations/byuuid", self.map).await?) + } + + pub async fn byurl(mut self, url: String) -> Result, RbError> { + self.map + .insert(String::from("url"), url); + Ok(self.api.send("/json/stations/byurl", self.map).await?) + } }