add station search by URL and UUIDs

This commit is contained in:
Ladislav Hano 2025-01-26 15:51:34 +01:00
parent 5270f8277b
commit 0786c89726

View file

@ -209,4 +209,16 @@ impl StationSearchBuilder {
pub async fn send(mut self) -> Result<Vec<ApiStation>, RbError> {
Ok(self.api.send("/json/stations/search", self.map).await?)
}
pub async fn byuuid(mut self, uuids: String) -> Result<Vec<ApiStation>, 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<Vec<ApiStation>, RbError> {
self.map
.insert(String::from("url"), url);
Ok(self.api.send("/json/stations/byurl", self.map).await?)
}
}