Print album ids and titles.

This commit is contained in:
Bill Thiede 2020-02-03 22:37:41 -08:00
parent 10d8ec406f
commit 013a45f553

View File

@ -5,7 +5,7 @@ use google_photoslibrary1;
use yup_oauth2::GetToken;
use yup_oauth2::{Authenticator, InstalledFlow};
fn main() {
fn main() -> Result<(), Box<dyn std::error::Error>> {
// 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(())
}