aboutsummaryrefslogtreecommitdiffstats
path: root/src/skweets.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2023-02-15 18:08:23 +0000
committerLibravatar cel 🌸 <cel@blos.sm>2023-02-15 18:08:23 +0000
commitb8bbceb00be3ba01cd14a111f4dfc407880f493e (patch)
treea5a4897e10f992b70c05bb494c4eb3c1c09091e8 /src/skweets.rs
parentfce07d2749f2e5fad3e4925919233d2f3796b684 (diff)
downloadblossom-b8bbceb00be3ba01cd14a111f4dfc407880f493e.tar.gz
blossom-b8bbceb00be3ba01cd14a111f4dfc407880f493e.tar.bz2
blossom-b8bbceb00be3ba01cd14a111f4dfc407880f493e.zip
refactor rust into separate files and add proper error handling
Diffstat (limited to 'src/skweets.rs')
-rw-r--r--src/skweets.rs10
1 files changed, 10 insertions, 0 deletions
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<Vec<Status>, BlossomError> {
+ Ok(client
+ .statuses("cel", Default::default())
+ .await?
+ .initial_items)
+}