aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fatcat-cli/src/commands.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/fatcat-cli/src/commands.rs b/fatcat-cli/src/commands.rs
index 32bfea2..624374a 100644
--- a/fatcat-cli/src/commands.rs
+++ b/fatcat-cli/src/commands.rs
@@ -27,6 +27,7 @@ pub struct ClientStatus {
pub api_host: String,
pub last_changelog: Option<i64>,
pub account: Option<models::Editor>,
+ pub cli_api_version: String,
}
impl ClientStatus {
@@ -80,6 +81,7 @@ impl ClientStatus {
has_api_token,
last_changelog,
account,
+ cli_api_version: fatcat_openapi::API_VERSION.to_string(),
})
}
@@ -98,6 +100,11 @@ impl ClientStatus {
color_sad.set_fg(Some(Color::Red)).set_bold(true);
color_stdout.set_color(&color_normal)?;
+ write!(&mut color_stdout, "{:>16}: ", "API Version")?;
+ color_stdout.set_color(&color_bold)?;
+ writeln!(&mut color_stdout, "{} (local)", self.cli_api_version)?;
+
+ color_stdout.set_color(&color_normal)?;
write!(&mut color_stdout, "{:>16}: ", "API host")?;
color_stdout.set_color(&color_bold)?;
write!(&mut color_stdout, "{}", self.api_host)?;