#web-api #api #web #assets #3d #request-response #3d-model

ambientcg

Rust interface around the ambientCG v2 web API

5 releases

0.2.2 Aug 18, 2022
0.2.1 Aug 18, 2022
0.2.0 Aug 18, 2022
0.1.1 Aug 15, 2022
0.1.0 Aug 15, 2022

#30 in #3d-model

21 downloads per month

MIT license

36KB
808 lines

ambientcg-rs

Provides a relatively user-friendly Rust API for interacting with the ambientCG v2 web API.

ambientCG is a public domain, free source of high quality PBR materials, HDRIs, models and more. This crate isn’t officially supported by, endorsed by or created by ambientCG; instead, it’s a community-built wrapper around their own web APIs.

This crate was largely made for my own personal usage. It’s incomplete and probably could do with a lot more work. Nonetheless I’m publishing it now, in it’s semi-complete state, so that I can more easily use it in other projects I’m working on. I don’t intend for this to be used widely at the moment.

Example

use ambientcg::{Request, Response};
 
let request = ambientcg::Request {
    q: ["fabric".to_string()],
    limit: Some(10),
    .. Default::default()
}
 
let response = request.submit().await?;
 
println!("Found {} assets", response.found_assets.len());

lib.rs:

ambientcg

Provides a relatively user-friendly Rust API for interacting with the ambientCG v2 web API.

ambientCG is a public domain, free source of high quality PBR materials, HDRIs, models and more. This crate isn't officially supported by, endorsed by or created by ambientCG; instead, it's a community-built wrapper around their own web APIs.

This crate was largely made for my own personal usage. It's incomplete and probably could do with a lot more work. Nonetheless I'm publishing it now, in it's semi-complete state, so that I can more easily use it in other projects I'm working on. I don't intend for this to be used widely at the moment.

Example

use ambientcg::{Request, Response};

let request = ambientcg::Request {
    q: ["fabric".to_string()],
    limit: Some(10),
    .. Default::default()
}

let response = request.submit().await?;

println!("Found {} assets", response.found_assets.len());

Dependencies

~8–24MB
~336K SLoC