[−][src]Crate urbandictionary
urbandictionary.rs
Unofficial async Rust client for the Urbandictionary API.
Installation
Add the following dependency to your Cargo.toml:
urbandictionary = "0.4.0-alpha.0"
Examples
Using hyper
with the hyper-tls
HTTPS connector, retrieve a list of
definitions for a word and print the example of the second 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 |