blob: c5093da435a792c164388c6082fc4360e0a64f82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
use eyre::Result;
use log::debug;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
struct RandomTeawieResponse {
url: String,
}
const GUZZLE: &str = "https://api.mydadleft.me";
const RANDOM_TEAWIE: &str = "/random_teawie";
pub async fn random_teawie() -> Result<String> {
let url = format!("{GUZZLE}{RANDOM_TEAWIE}");
debug!("Making request to {url}");
let json: RandomTeawieResponse = super::get_json(&url).await?;
Ok(json.url)
}
|