changed permissions to all
This commit is contained in:
parent
c98ea6b156
commit
6e5a3ed94e
11
src/main.rs
11
src/main.rs
|
@ -1,7 +1,7 @@
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use mastodon_async::helpers::toml; use mastodon_async::scopes;
|
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::{entities::visibility::Visibility};
|
||||||
use mastodon_async::{helpers::cli, Result};
|
use mastodon_async::{helpers::cli, Result};
|
||||||
use reqwest;
|
use reqwest;
|
||||||
|
@ -16,13 +16,18 @@ async fn main() -> Result<()> {
|
||||||
register().await?
|
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() {
|
match get_next_url() {
|
||||||
Some(url) => {
|
Some(url) => {
|
||||||
post_image(&mastodon, &url).await;
|
post_image(&mastodon, &url).await;
|
||||||
update_bio(&mastodon).await;
|
update_bio(&mastodon).await;
|
||||||
},
|
},
|
||||||
None => post(&mastodon, "@Sugui@awoo.fai.st @MeDueleLaTeta@awoo.fai.st me quedé sin chicas").await
|
None => post(&mastodon, "@Sugui@awoo.fai.st @MeDueleLaTeta@awoo.fai.st me quedé sin chicas").await
|
||||||
};
|
};*/
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -98,7 +103,7 @@ async fn fetch_url(url: String, file_name: String) -> Result<()> {
|
||||||
async fn register() -> Result<Mastodon> {
|
async fn register() -> Result<Mastodon> {
|
||||||
let registration = Registration::new("https://awoo.fai.st")
|
let registration = Registration::new("https://awoo.fai.st")
|
||||||
.client_name("sleeping-girls-bot")
|
.client_name("sleeping-girls-bot")
|
||||||
.scopes(Scopes::write(scopes::Write::Accounts))
|
.scopes(Scopes::all())
|
||||||
.build()
|
.build()
|
||||||
.await?;
|
.await?;
|
||||||
let mastodon = cli::authenticate(registration).await?;
|
let mastodon = cli::authenticate(registration).await?;
|
||||||
|
|
Loading…
Reference in New Issue