suplapi

Crates.iosuplapi
lib.rssuplapi
version0.2.1
sourcesrc
created_at2021-09-20 20:58:59.743019
updated_at2021-09-24 21:18:48.874173
descriptionAccess Nelonen Media Supla API from Rust
homepage
repositoryhttps://gitlab.com/x7Gv/suplapi-rs/
max_upload_size
id454151
size13,290
(x7Gv)

documentation

README

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.

Commit count: 16

cargo fmt