mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 00:00:26 +00:00
Introduces getAlbumListByNTQQ to NTQQWebApi for retrieving group album lists via NTQQ. Updates NodeIKernelAlbumService interface for typed getAlbumList parameters and response. Refactors GetQunAlbumList action to use the new NTQQ API and return the correct album list format. Also fixes cookie and bkn usage in album-related methods for consistency.
20 lines
702 B
TypeScript
20 lines
702 B
TypeScript
|
|
import { NTQQWebApi } from '@/core/apis';
|
|
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
|
import { ActionName } from '@/onebot/action/router';
|
|
import { Static, Type } from '@sinclair/typebox';
|
|
const SchemaData = Type.Object({
|
|
group_id: Type.String()
|
|
});
|
|
|
|
type Payload = Static<typeof SchemaData>;
|
|
|
|
export class GetQunAlbumList extends OneBotAction<Payload,Awaited<ReturnType<NTQQWebApi['getAlbumListByNTQQ']>>['response']['album_list']> {
|
|
override actionName = ActionName.GetQunAlbumList;
|
|
override payloadSchema = SchemaData;
|
|
|
|
async _handle(payload: Payload) {
|
|
return (await this.core.apis.WebApi.getAlbumListByNTQQ(payload.group_id)).response.album_list;
|
|
}
|
|
}
|