A crate for interacting with Some Random API.
```rs use somerandomapi::{Client, WelcomeImage, WelcomeImageBackground}; use std::{error::Error, fs::write}; use tokio::main;
async fn main() -> Result<(), Box
// Look up definition of a word
let definition = client.others.dictionary("resuscitate").await?;
println!("{:#?}", definition);
// Generate a welcome image
let welcome_image = client
.welcome
.image(
WelcomeImage::new(
"Username",
"0001",
"https://cdn.discordapp.com/embed/avatars/0.png",
"Guild Name",
194,
)
.set_background(WelcomeImageBackground::Night),
)
.await?;
// Save the welcome image to a file
write("welcome.png", welcome_image)?;
Ok(())
} ```
Read the documentation for more information.