diff options
| author | Yuval Adam <_@yuv.al> | 2024-05-31 12:34:15 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2024-05-31 12:34:15 +0200 |
| commit | b08fc14aa5d81287b4a24765a09c6b6fbff88be5 (patch) | |
| tree | 32c00e535481d7421bc442811867f79e74ee11a7 /src/main.rs | |
| parent | 083aa3410d8be297470051e39fb3b62960797bb0 (diff) | |
Properly deserialize channels vec
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 152a2ae..3ff36de 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ mod channels; fn main() { - let url = "https://api.somafm.com/channels.json"; - let res = reqwest::blocking::get(url).unwrap().text().unwrap(); - println!("{res}"); + let channels = channels::get_channels(); + let groove_salad = channels.iter().find(|c| c.id == "groovesalad").unwrap(); + println!("{:?}", groove_salad); } |
