| Crates.io | teeskins |
| lib.rs | teeskins |
| version | 0.1.0 |
| created_at | 2022-07-22 21:31:51.781248+00 |
| updated_at | 2022-07-22 21:31:51.781248+00 |
| description | Wrapper for Teeskins public API |
| homepage | https://github.com/Teeskins/teeskins-rs |
| repository | https://github.com/Teeskins/teeskins-rs |
| max_upload_size | |
| id | 631119 |
| size | 24,285 |
Install the dependencies
cargoCreate the file .env in the repository source using the .env_example
use teeskins::api::TeeskinsApi;
use std::env;
use dotenv::dotenv;
fn main() {
dotenv().ok();
let host = env::var("HOST")
.unwrap_or("https://localhost".to_string());
let api = TeeskinsApi::new(
"".to_string(),
host
);
let asset = api.get_profile("nagi01".to_string());
println!("{}", match asset {
Some(v) => v.user.name,
None => String::from("Name has not been found")
}
)
}
Run cargo test
The tests are using the following environment variables:
HOSTDISCORD_TOKEN