listenbrainz-rs/examples/delete_listen.rs

19 lines
589 B
Rust
Raw Permalink Normal View History

2021-01-19 22:41:54 +00:00
use listenbrainz::raw::request::DeleteListen;
2021-01-19 22:45:43 +00:00
use listenbrainz::raw::Client;
2021-01-14 01:49:41 +00:00
fn main() {
let mut args = std::env::args().skip(1);
let token = args.next().expect("No token provided");
let listened_at = args.next().expect("No listened_at provided");
let recording_msid = args.next().expect("No recording_msid provided");
let client = Client::new();
2021-01-14 01:49:41 +00:00
let delete = DeleteListen {
listened_at: listened_at.parse().unwrap(),
recording_msid: &recording_msid,
};
let result = client.delete_listen(&token, delete);
println!("{:#?}", result);
}