From 013a45f553bdf9f2cc0997a729ebdbc4715e98bd Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Mon, 3 Feb 2020 22:37:41 -0800 Subject: [PATCH] Print album ids and titles. --- src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 41a8f9e..2d0f044 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,7 @@ use google_photoslibrary1; use yup_oauth2::GetToken; use yup_oauth2::{Authenticator, InstalledFlow}; -fn main() { +fn main() -> Result<(), Box> { // Read application secret from a file. Sometimes it's easier to compile it directly into // the binary. The clientsecret file contains JSON like `{"installed":{"client_id": ... }}` let credentials = "/home/wathiede/src/xinu.tv/photosync/auth/oob-credentials.json"; @@ -33,6 +33,12 @@ fn main() { .list() .iter_shared_albums_with_all_fields() { - println!("album: {:?}", album); + let a = album?; + println!( + "album: {} {}", + a.id.unwrap_or("NO ID".to_string()), + a.title.unwrap_or("NO TITLE".to_string()) + ); } + Ok(()) }