diff options
Diffstat (limited to 'src/bin/zot/command/channel/list.rs')
-rw-r--r-- | src/bin/zot/command/channel/list.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/bin/zot/command/channel/list.rs b/src/bin/zot/command/channel/list.rs new file mode 100644 index 0000000..a308517 --- /dev/null +++ b/src/bin/zot/command/channel/list.rs @@ -0,0 +1,21 @@ +/* + * SPDX-FileCopyrightText: 2024 Eilertsens Kodeknekkeri + * SPDX-FileCopyrightText: 2024 Harald Eilertsen + * + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +use zotapi::ZotApi; +use std::error::Error; + +pub struct ChannelListCmd { +} + +impl ChannelListCmd { + pub async fn run(&self, client: ZotApi) -> Result<(), Box<(dyn Error + 'static)>> { + for ch in client.channel_list().await? { + println!("{}", ch); + } + Ok(()) + } +} |