oxyde-cloud-cli 0.4.4

CLI for the Oxyde Cloud
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::api_key::api_key;
use anyhow::{Context, Result};
use oxyde_cloud_client::Client;

pub async fn log(name: &str) -> Result<()> {
    let api_key = api_key().context("Failed to get API key")?;
    let client = Client::new(api_key);

    let logs = client
        .log(name)
        .await
        .with_context(|| format!("Failed to fetch logs for app '{name}'"))?;

    println!("{logs}");

    Ok(())
}