GmailProfileGetCommand (profile/get.rs)

himalaya · src/gmail/profile/get.rs · rust · Apache-2.0
email

CLI command to fetch and display Gmail profile information.

// Source: https://github.com/pimalaya/himalaya | License: Apache-2.0 | Copyright 2022-2026 soywod <pimalaya.org@posteo.net>
// Provided via justclaw.it.com; keep this notice with the code.
//! # Gmail profile get
//!
//! The `gmail profile get` command, `users.getProfile`.

use std::fmt;

use anyhow::Result;
use clap::Parser;
use pimalaya_cli::printer::Printer;
use schemars::JsonSchema;
use serde::Serialize;

use crate::gmail::client::GmailClient;

/// Get the Gmail profile: email address, message/thread totals and the
/// current history id.
#[derive(Debug, Parser)]
pub struct GmailProfileGetCommand;

impl GmailProfileGetCommand {
    /// Fetches the profile and tables it.
    pub fn execute(self, printer: &mut impl Printer, client: &mut GmailClient) -> Result<()> {
        let profile =

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key