summaryrefslogtreecommitdiff
path: root/src/api/shiggy.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/shiggy.rs')
-rw-r--r--src/api/shiggy.rs20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/api/shiggy.rs b/src/api/shiggy.rs
deleted file mode 100644
index d6a6238..0000000
--- a/src/api/shiggy.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-use eyre::Result;
-use log::debug;
-use serde::Deserialize;
-
-const SHIGGY: &str = "https://safebooru.donmai.us";
-const RANDOM_SHIGGY: &str = "/posts/random.json?tags=kemomimi-chan_(naga_u)+naga_u&only=file_url";
-
-#[derive(Deserialize)]
-struct SafebooruResponse {
- file_url: String,
-}
-
-#[allow(clippy::module_name_repetitions)]
-pub async fn random_shiggy() -> Result<String> {
- let url = format!("{SHIGGY}{RANDOM_SHIGGY}");
- debug!("Making request to {url}");
-
- let resp: SafebooruResponse = super::get_json(&url).await?;
- Ok(resp.file_url)
-}