From b8bbceb00be3ba01cd14a111f4dfc407880f493e Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Wed, 15 Feb 2023 18:08:23 +0000 Subject: refactor rust into separate files and add proper error handling --- src/skweets.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/skweets.rs (limited to 'src/skweets.rs') diff --git a/src/skweets.rs b/src/skweets.rs new file mode 100644 index 0000000..91369ec --- /dev/null +++ b/src/skweets.rs @@ -0,0 +1,10 @@ +use crate::error::BlossomError; +use mastodon_async::entities::status::Status; +use mastodon_async::prelude::*; + +pub async fn get_recents(client: &Mastodon) -> Result, BlossomError> { + Ok(client + .statuses("cel", Default::default()) + .await? + .initial_items) +} -- cgit