aboutsummaryrefslogtreecommitdiff
path: root/src/client/apis/google_docs/GooglePhotosClientUtils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/apis/google_docs/GooglePhotosClientUtils.ts')
-rw-r--r--src/client/apis/google_docs/GooglePhotosClientUtils.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/apis/google_docs/GooglePhotosClientUtils.ts b/src/client/apis/google_docs/GooglePhotosClientUtils.ts
index dfc4a6ddf..a13d9dcd6 100644
--- a/src/client/apis/google_docs/GooglePhotosClientUtils.ts
+++ b/src/client/apis/google_docs/GooglePhotosClientUtils.ts
@@ -214,9 +214,9 @@ export namespace GooglePhotos {
let nextPageTokenStored: Opt<string> = undefined;
let found = 0;
do {
- const { mediaItems, nextPageToken } = (await photos.search(albumId, pageSize, nextPageTokenStored)) as any;
- mediaItems.push(...mediaItems);
- nextPageTokenStored = nextPageToken;
+ const response: any = await photos.mediaItems.search(albumId, pageSize, nextPageTokenStored);
+ mediaItems.push(...response.mediaItems);
+ nextPageTokenStored = response.nextPageToken;
} while (found);
return mediaItems;
};
@@ -280,6 +280,8 @@ export namespace GooglePhotos {
baseUrl: string;
}
+ export const ListAlbums = async () => (await endpoint()).albums.list();
+
export const AddTextEnrichment = async (collection: Doc, content?: string) => {
const photos = await endpoint();
const albumId = StrCast(collection.albumId);