refactor star

This commit is contained in:
austinried
2022-03-20 09:33:15 +09:00
parent 1803e9dc7c
commit a15159014c
10 changed files with 122 additions and 146 deletions

View File

@@ -11,6 +11,7 @@ import {
GetMusicDirectoryParams,
GetPlaylistParams,
GetPlaylistsParams,
GetSongParams,
GetTopSongsParams,
ScrobbleParams,
Search3Params,
@@ -29,6 +30,7 @@ import {
GetMusicDirectoryResponse,
GetPlaylistResponse,
GetPlaylistsResponse,
GetSongResponse,
GetTopSongsResponse,
Search3Response,
SubsonicResponse,
@@ -180,6 +182,11 @@ export class SubsonicApiClient {
return new SubsonicResponse<GetTopSongsResponse>(xml, new GetTopSongsResponse(xml))
}
async getSong(params: GetSongParams): Promise<SubsonicResponse<GetSongResponse>> {
const xml = await this.apiGetXml('getSong', params)
return new SubsonicResponse<GetSongResponse>(xml, new GetSongResponse(xml))
}
//
// Album/song lists
//