#api #media #playlist #supla #nelonen

suplapi

Access Nelonen Media Supla API from Rust

4 releases

0.2.1 Sep 24, 2021
0.2.0 Sep 24, 2021
0.1.1 Sep 22, 2021
0.1.0 Sep 20, 2021

#35 in #playlist

MIT license

13KB
210 lines

SuplAPI

gitlab crates.io docs.rs

Access Nelonen Media Supla API from Rust.

Currently implemented features

  • supla-playlist.nm-services.nelonenmedia.fi API
  • prod-component-api.nm-services.nelonenmedia.fi/api/radio-programs API

Example(s)

Query current playlist history

extern crate suplapi;

let groove_fm = 70;

let supla = suplapi::SuplAPI::<suplapi::http::default::Client>::default();
let playlist = supla.playlist(groove_fm, 20, None).await.unwrap();
assert!(playlist.items.len() == 20);

Credits

The crate has heavily drawn inspiration from the excellent wikipedia crate.

Dependencies

~3–15MB
~207K SLoC