musket 0.7.0

Musket is a command line interface to send a URL to several destinations.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::{
    config,
    destinations::{turso::Turso, Destination},
};

pub async fn execute(
    cfg: &config::Configuration,
    url: &str,
    vector_of_tags: &[String],
) -> Result<(), Box<dyn std::error::Error>> {
    let mut turso = Turso::new();
    turso.configure(&cfg.turso.url, &cfg.turso.token);
    turso.fire(url, vector_of_tags).await?;
    println!("The url \"{}\" has been sent to Turso.", url);
    Ok(())
}