1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add JSDoc comment to getItems helper

In return the comments at each usage are removed.
This commit is contained in:
Merlin Danner 2023-03-29 07:44:21 +02:00
parent d8bbba2dc9
commit 06c4f0f258
5 changed files with 8 additions and 8 deletions

View file

@ -49,6 +49,14 @@ function mergeResults(results: BaseItemDtoQueryResult[]) {
return merged;
}
/**
* Transparently handles the call to apiClient.getItems splitting the
* call into multiple ones if the URL might get too long.
* @param apiClient The ApiClient to use
* @param userId User id to pass to actual getItems call
* @param options Options object to specify getItems option. This includes a possibly long Items list that will be split up.
* @returns A promise that resolves to the merged result of all getItems calls
*/
export function getItems(apiClient: ApiClient, userId: string, options?: any) {
if (options.Ids?.split(',').length <= ITEMS_PER_REQUEST_LIMIT) {
return apiClient.getItems(apiClient.getCurrentUserId(), options);