mirror of
https://gitlab.com/hladislav/radiobrowser-lib-rust.git
synced 2025-04-29 15:24:10 +00:00
add station search by URL and UUIDs
This commit is contained in:
parent
5270f8277b
commit
0786c89726
1 changed files with 12 additions and 0 deletions
|
@ -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?)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue