My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/apps/unionbot/src/register.rs

18 lines
513 B

use crate::config::Config;
use elefren::{
errors::Result,
http_send::HttpSender,
registration::{Registered, Registration},
scopes::Scopes,
};
// use mammut::{apps::AppBuilder, Registration, Mastodon};
/// Attempt to register an account
pub(crate) fn register(cfg: &Config) -> Result<Registered<HttpSender>> {
Registration::new(cfg.instance.as_str())
.client_name("unionbot")
.redirect_uris("urn:ietf:wg:oauth:2.0:oob")
.scopes(Scopes::write_all())
.build()
}