shadertoy

Crates.ioshadertoy
lib.rsshadertoy
version0.6.1
sourcesrc
created_at2017-12-31 18:41:39.10202
updated_at2018-06-02 23:49:39.608735
descriptionRust library wrapping the Shadertoy REST API to be able to easily search through and download Shadertoy assets.
homepage
repositoryhttps://github.com/repi/shadertoy-browser/tree/master/src/shadertoy
max_upload_size
id45066
size24,896
Johan Andersson (repi)

documentation

README

Shadertoy API

Crate Docs.rs Build Status Build Status MIT/Apache

Rust library wrapping the Shadertoy REST API to be able to easily search through and download Shadertoy assets.

Usage

In Cargo.toml:

[dependencies]
shadertoy = "0.5"

Example usage:

extern crate shadertoy;

fn test() {
    let client = shadertoy::Client::new("Bd8tWD"); // insert your own API key here
    
	let search_params = shadertoy::SearchParams {
        string: "car",
        sort_order: shadertoy::SearchSortOrder::Love,
        filters: vec![],
    };

    match client.search(&search_params) {
        Ok(shader_ids) => println!("\"Car\" shadertoys: {:?}", shader_ids),
        Err(err) => println!("Search failed: {}", err),
    }
}

TODO

License

Licensed under either of the following, at your option:

Contribution

Contributions are welcome! Please note that your contributions are assumed to be dual-licensed under Apache-2.0/MIT.

Commit count: 258

cargo fmt