From 4a45c68943810ad253d28d1cc0c95d794acf4726 Mon Sep 17 00:00:00 2001 From: Adrian Calinescu Date: Sat, 14 Nov 2020 19:56:59 +0200 Subject: [PATCH] Fix group download, added 100 video limit --- src/Utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Utils.ts b/src/Utils.ts index 6d075fa..1fc5a62 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -23,7 +23,8 @@ async function extractGuids(url: string, client: ApiClient): Promise | undefined) => response?.data.metrics.videos); - const result: Array = await client.callApi(`groups/${groupMatch[1]}/videos?$top=${videoNumber}&$orderby=publishedDate asc`, 'get') + // Anything above $top=100 results in 400 Bad Request + const result: Array = await client.callApi(`groups/${groupMatch[1]}/videos?$top=100&$orderby=publishedDate asc`, 'get') .then((response: AxiosResponse | undefined) => response?.data.value.map((item: any) => item.id)); return result;