[−][src]Crate urbandictionary
urbandictionary.rs
Unofficial async Rust client for the Urbandictionary API.
Installation
This library requires at least Rust 1.39.
Add the following dependency to your Cargo.toml:
urbandictionary = "0.4.0-alpha.1"
Examples
Retrieve a list of definitions for a word and print the example of the first definition, if it exists:
use reqwest::Client as HttpClient; use urbandictionary::Client; let http_client = HttpClient::new(); let client = Client::new(http_client); let definition = client.define("cat").await?; if let Some(definition) = definition { println!("Examples: {}", definition.example); }
Modules
error | |
model | Models mapping the UrbanDictionary API's response types. |
Structs
Client |