From 6e5a3ed94ebe47601da047053dd076af81aace98 Mon Sep 17 00:00:00 2001 From: Suguivy Date: Mon, 3 Jul 2023 20:42:04 +0200 Subject: [PATCH] changed permissions to all --- src/main.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index e1d1c49..425c555 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ use std::collections::HashSet; use std::process::Command; use mastodon_async::helpers::toml; use mastodon_async::scopes; -use mastodon_async::{prelude::*, UpdateCredsRequest}; +use mastodon_async::{prelude::*}; use mastodon_async::{entities::visibility::Visibility}; use mastodon_async::{helpers::cli, Result}; use reqwest; @@ -16,13 +16,18 @@ async fn main() -> Result<()> { register().await? }; + let data = Data::default(); + let client = Mastodon::from(data); + let statuses = client.statuses(&AccountId::new("user-id"), Default::default()).await.unwrap(); + dbg!(statuses); +/* match get_next_url() { Some(url) => { post_image(&mastodon, &url).await; update_bio(&mastodon).await; }, None => post(&mastodon, "@Sugui@awoo.fai.st @MeDueleLaTeta@awoo.fai.st me quedé sin chicas").await - }; + };*/ Ok(()) } @@ -98,7 +103,7 @@ async fn fetch_url(url: String, file_name: String) -> Result<()> { async fn register() -> Result { let registration = Registration::new("https://awoo.fai.st") .client_name("sleeping-girls-bot") - .scopes(Scopes::write(scopes::Write::Accounts)) + .scopes(Scopes::all()) .build() .await?; let mastodon = cli::authenticate(registration).await?;