Skip to content

Latest commit

 

History

History
76 lines (49 loc) · 1.57 KB

README.md

File metadata and controls

76 lines (49 loc) · 1.57 KB

SongKick Rust

SongKick API library written in Rust


Usage

Add this in your Cargo.toml:

[dependencies]
songkick = "0.1.0"

... and then this in your crate

extern crate songkick;

Example

Fetch Artist Info with SongKick ID

use songkick::{SongKick};
use songkick::resources::Artist;
use songkick::endpoints::{SkEndpoint};
let sk = SongKick::new("API_KEY");
//RadioHead ID
let artists : Vec<Artist> = sk.artist.get(253846)
.and_then(|res| Ok(res.collect()))
.expect("Failed to fetch artist with id");
assert_eq!(1,artists.len());

Check more examples here