[][src]Function tweetr::ops::add_user::authorise

pub fn authorise<'t, R, W, T>(
    input: &mut R,
    output: &mut W,
    conn_token: T,
    verbose: bool
) -> Result<User, Outcome> where
    R: BufRead,
    W: Write,
    T: Into<Token<'t>>, 

Direct the user towards the authorisation URL and prompt it for the PIN.

Returns Err() if accessing the Twitter API failed for whatever reason.

Examples

assert!(add_user::authorise(&mut BufReader::new(b"1234567\n" as &[u8]), &mut Vec::new(), AppTokens {
    key: "GeVFiYk7q8DhUmgMXE0iODrFa".to_string(),
    secret: "bH3VIvYEwwVmMXkTnXB8N3HEQf4ShOf2Z4e1dkaqSJNGorK2pe".to_string(),
}, false).is_ok());