Crates.io | sunk |
lib.rs | sunk |
version | 0.1.2 |
source | src |
created_at | 2018-02-02 09:19:51.520902 |
updated_at | 2018-11-28 22:36:10.701918 |
description | Rust bindings for the Subsonic music streaming API |
homepage | https://github.com/xeals/sunk |
repository | https://github.com/xeals/sunk |
max_upload_size | |
id | 49318 |
size | 171,651 |
A library for interfacing with the Subsonic API.
The library is designed to be as ergonomic and feel as natural as to Rust as possible.
It aims to support any version of the Subsonic API from 1.8.0 onwards.
extern crate sunk;
let username = "guest3";
let password = "guest";
let site = "http://demo.subsonic.org";
let client = sunk::Client::new(site, username, password).unwrap();
// Update the library.
client.ping().unwrap()
client.scan_library().unwrap();
// Fetch some songs and play them.
let mut random = sunk::song::Song::random(&client, 20).unwrap();
for song in random {
song.set_max_bit_rate(96);
let bytes: Vec<u8> = song.stream(&client);
// Pass `bytes` to an audio library to actually play the song.
}
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.