bird 0.2.0

X API CLI with entity caching, search, threads, and watchlists
Documentation
//! `bird thread` — reconstruct a conversation thread.

use crate::cli::dispatch::default_auth_type;
use crate::db;
use crate::error::BirdError;
use crate::output::OutputConfig;
use crate::thread;

pub fn run(
    client: &mut db::BirdClient,
    out: &OutputConfig,
    stdout: &mut dyn std::io::Write,
    stderr: &mut dyn std::io::Write,
    tweet_id: String,
    pretty: bool,
    max_pages: u32,
) -> Result<(), BirdError> {
    let auth_type = default_auth_type("thread");
    thread::run_thread(
        client,
        out,
        stdout,
        stderr,
        thread::ThreadOpts {
            tweet_id: &tweet_id,
            pretty,
            max_pages,
        },
        &auth_type,
    )
    .map_err(|e| BirdError::from_source("thread", e))?;
    Ok(())
}