Print album ids and titles.
This commit is contained in:
parent
10d8ec406f
commit
013a45f553
10
src/main.rs
10
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<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(())
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user