[−][src]Function tweetr::ops::add_user::append_user
pub fn append_user(users_path: &Path, user: User) -> Outcome
Append the specified user to the authenticated users list at the specified path.
Examples
let tf = temp_dir().join("tweetr-doctest").join("ops-add-user-append_users"); fs::create_dir_all(&tf).unwrap(); let tf = tf.join("users.toml"); add_user::append_user(&tf, User { name: "random-test-name".to_string(), id: 0x969696969, access_token_key: "40423221609-Y0klmK9nWNRAScBuumWvAtSOzmIvBIBLJpc3Ept".to_string(), access_token_secret: "zFYbEO5wQtST3eK84pGuzSmmEByZbQ0EVY8uAS4BCM1mx".to_string(), }); assert!(tf.exists());