Changed Scope for examples and allowed input of custom domain.

master
Aaron Power 7 years ago
parent 20915671d8
commit 70ecc26ab8
  1. 5
      examples/register.rs

@ -36,11 +36,12 @@ pub fn register() -> Result<Mastodon, Box<Error>> {
let app = AppBuilder {
client_name: "mammut-examples",
redirect_uris: "urn:ietf:wg:oauth:2.0:oob",
scopes: Scopes::Read,
scopes: Scopes::All,
website: Some("https://github.com/Aaronepower/mammut"),
};
let mut registration = Registration::new("https://mastodon.social");
let website = read_line("Please enter your mastodon instance url:")?;
let mut registration = Registration::new(website.trim());
registration.register(app)?;
let url = registration.authorise()?;

Loading…
Cancel
Save