Skip to content

Commit

Permalink
Merge pull request #439 from thornbill/export-api-utils
Browse files Browse the repository at this point in the history
Add index for api util functions
  • Loading branch information
thornbill authored Mar 29, 2023
2 parents 1149d6c + 51e32e4 commit cd59dcb
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 64 deletions.
63 changes: 2 additions & 61 deletions src/utils/api/__tests__/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

import { getActivityLogApi, getApiKeyApi, getArtistsApi, getAudioApi, getBrandingApi, getChannelsApi, getClientLogApi, getCollectionApi, getConfigurationApi, getDashboardApi, getDevicesApi, getDisplayPreferencesApi, getDlnaApi, getDlnaServerApi, getDynamicHlsApi, getEnvironmentApi, getFilterApi, getGenresApi, getHlsSegmentApi, getImageApi, getImageByNameApi, getInstantMixApi, getItemLookupApi, getItemRefreshApi, getItemUpdateApi, getItemsApi, getLibraryApi, getLibraryStructureApi, getLiveTvApi, getLocalizationApi, getMediaInfoApi, getMoviesApi, getMusicGenresApi, getNotificationsApi, getPackageApi, getPersonsApi, getPlaylistsApi, getPlaystateApi, getPluginsApi, getQuickConnectApi, getRemoteImageApi, getScheduledTasksApi, getSearchApi, getSessionApi, getStartupApi, getStudiosApi, getSubtitleApi, getSuggestionsApi, getSyncPlayApi, getSystemApi, getTimeSyncApi, getTmdbApi, getTrailersApi, getTvShowsApi, getUniversalAudioApi, getUserApi, getUserLibraryApi, getUserViewsApi, getVideoAttachmentsApi, getVideosApi, getYearsApi } from '..';

import { SERVER_URL, TEST_CLIENT, TEST_DEVICE } from '../../../__helpers__/common';

import { Api } from '../../../api';
import { ActivityLogApi, ApiKeyApi, ArtistsApi, AudioApi, BrandingApi, ChannelsApi, ClientLogApi, CollectionApi, ConfigurationApi, DashboardApi, DevicesApi, DisplayPreferencesApi, DlnaApi, DlnaServerApi, DynamicHlsApi, EnvironmentApi, FilterApi, GenresApi, HlsSegmentApi, ImageApi, ImageByNameApi, InstantMixApi, ItemLookupApi, ItemRefreshApi, ItemsApi, ItemUpdateApi, LibraryApi, LibraryStructureApi, LiveTvApi, LocalizationApi, MediaInfoApi, MoviesApi, MusicGenresApi, NotificationsApi, PackageApi, PersonsApi, PlaylistsApi, PlaystateApi, PluginsApi, QuickConnectApi, RemoteImageApi, ScheduledTasksApi, SearchApi, SessionApi, StartupApi, StudiosApi, SubtitleApi, SuggestionsApi, SyncPlayApi, SystemApi, TimeSyncApi, TmdbApi, TrailersApi, TvShowsApi, UniversalAudioApi, UserApi, UserLibraryApi, UserViewsApi, VideoAttachmentsApi, VideosApi, YearsApi } from '../../../generated-client/api';
import { getActivityLogApi } from '../activity-log-api';
import { getApiKeyApi } from '../api-key-api';
import { getArtistsApi } from '../artists-api';
import { getAudioApi } from '../audio-api';
import { getBrandingApi } from '../branding-api';
import { getChannelsApi } from '../channels-api';
import { getClientLogApi } from '../client-log-api';
import { getCollectionApi } from '../collection-api';
import { getConfigurationApi } from '../configuration-api';
import { getDashboardApi } from '../dashboard-api';
import { getDevicesApi } from '../devices-api';
import { getDisplayPreferencesApi } from '../display-preferences-api';
import { getDlnaApi } from '../dlna-api';
import { getDlnaServerApi } from '../dlna-server-api';
import { getDynamicHlsApi } from '../dynamic-hls-api';
import { getEnvironmentApi } from '../environment-api';
import { getFilterApi } from '../filter-api';
import { getGenresApi } from '../genres-api';
import { getHlsSegmentApi } from '../hls-segment-api';
import { getImageApi } from '../image-api';
import { getImageByNameApi } from '../image-by-name-api';
import { getInstantMixApi } from '../instant-mix-api';
import { getItemLookupApi } from '../item-lookup-api';
import { getItemRefreshApi } from '../item-refresh-api';
import { getItemUpdateApi } from '../item-update-api';
import { getItemsApi } from '../items-api';
import { getLibraryApi } from '../library-api';
import { getLibraryStructureApi } from '../library-structure-api';
import { getLiveTvApi } from '../live-tv-api';
import { getLocalizationApi } from '../localization-api';
import { getMediaInfoApi } from '../media-info-api';
import { getMoviesApi } from '../movies-api';
import { getMusicGenresApi } from '../music-genres-api';
import { getNotificationsApi } from '../notifications-api';
import { getPackageApi } from '../package-api';
import { getPersonsApi } from '../persons-api';
import { getPlaylistsApi } from '../playlists-api';
import { getPlaystateApi } from '../playstate-api';
import { getPluginsApi } from '../plugins-api';
import { getQuickConnectApi } from '../quick-connect-api';
import { getRemoteImageApi } from '../remote-image-api';
import { getScheduledTasksApi } from '../scheduled-tasks-api';
import { getSearchApi } from '../search-api';
import { getSessionApi } from '../session-api';
import { getStartupApi } from '../startup-api';
import { getStudiosApi } from '../studios-api';
import { getSubtitleApi } from '../subtitle-api';
import { getSuggestionsApi } from '../suggestions-api';
import { getSyncPlayApi } from '../sync-play-api';
import { getSystemApi } from '../system-api';
import { getTimeSyncApi } from '../time-sync-api';
import { getTmdbApi } from '../tmdb-api';
import { getTrailersApi } from '../trailers-api';
import { getTvShowsApi } from '../tv-shows-api';
import { getUniversalAudioApi } from '../universal-audio-api';
import { getUserApi } from '../user-api';
import { getUserLibraryApi } from '../user-library-api';
import { getUserViewsApi } from '../user-views-api';
import { getVideoAttachmentsApi } from '../video-attachments-api';
import { getVideosApi } from '../videos-api';
import { getYearsApi } from '../years-api';

/**
* Api helper function tests.
Expand Down
67 changes: 67 additions & 0 deletions src/utils/api/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

export * from './activity-log-api';
export * from './api-key-api';
export * from './artists-api';
export * from './audio-api';
export * from './branding-api';
export * from './channels-api';
export * from './client-log-api';
export * from './collection-api';
export * from './configuration-api';
export * from './dashboard-api';
export * from './devices-api';
export * from './display-preferences-api';
export * from './dlna-api';
export * from './dlna-server-api';
export * from './dynamic-hls-api';
export * from './environment-api';
export * from './filter-api';
export * from './genres-api';
export * from './hls-segment-api';
export * from './image-api';
export * from './image-by-name-api';
export * from './instant-mix-api';
export * from './item-lookup-api';
export * from './item-refresh-api';
export * from './item-update-api';
export * from './items-api';
export * from './library-api';
export * from './library-structure-api';
export * from './live-tv-api';
export * from './localization-api';
export * from './media-info-api';
export * from './movies-api';
export * from './music-genres-api';
export * from './notifications-api';
export * from './package-api';
export * from './persons-api';
export * from './playlists-api';
export * from './playstate-api';
export * from './plugins-api';
export * from './quick-connect-api';
export * from './remote-image-api';
export * from './scheduled-tasks-api';
export * from './search-api';
export * from './session-api';
export * from './startup-api';
export * from './studios-api';
export * from './subtitle-api';
export * from './suggestions-api';
export * from './sync-play-api';
export * from './system-api';
export * from './time-sync-api';
export * from './tmdb-api';
export * from './trailers-api';
export * from './tv-shows-api';
export * from './universal-audio-api';
export * from './user-api';
export * from './user-library-api';
export * from './user-views-api';
export * from './video-attachments-api';
export * from './videos-api';
export * from './years-api';
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
},
"typedocOptions": {
"entryPoints": [
"./src/index.ts",
"./src/generated-client/index.ts",
"./src/models/api/index.ts"
"src/index.ts",
"src/generated-client/index.ts",
"src/models/api/index.ts",
"src/utils/api/index.ts"
],
"out": "docs"
},
Expand Down

0 comments on commit cd59dcb

Please sign in to comment.