mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-09-28 12:07:57 +00:00
chore: clean code for collection.ts
This commit is contained in:
parent
b50d7c24e7
commit
9c5f3f1946
@ -10,7 +10,7 @@ export class NTQQCollectionApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async createCollection(authorUin: string, authorUid: string, authorName: string, brief: string, rawData: string) {
|
async createCollection(authorUin: string, authorUid: string, authorName: string, brief: string, rawData: string) {
|
||||||
const param = {
|
return this.context.session.getCollectionService().createNewCollectionItem({
|
||||||
commInfo: {
|
commInfo: {
|
||||||
bid: 1,
|
bid: 1,
|
||||||
category: 2,
|
category: 2,
|
||||||
@ -43,12 +43,11 @@ export class NTQQCollectionApi {
|
|||||||
fileList: [],
|
fileList: [],
|
||||||
},
|
},
|
||||||
need_share_url: false,
|
need_share_url: false,
|
||||||
};
|
});
|
||||||
return this.context.session.getCollectionService().createNewCollectionItem(param);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAllCollection(category: number = 0, count: number = 50) {
|
async getAllCollection(category: number = 0, count: number = 50) {
|
||||||
const param = {
|
return this.context.session.getCollectionService().getCollectionItemList({
|
||||||
category: category,
|
category: category,
|
||||||
groupId: -1,
|
groupId: -1,
|
||||||
forceSync: true,
|
forceSync: true,
|
||||||
@ -56,7 +55,6 @@ export class NTQQCollectionApi {
|
|||||||
timeStamp: '0',
|
timeStamp: '0',
|
||||||
count: count,
|
count: count,
|
||||||
searchDown: true,
|
searchDown: true,
|
||||||
};
|
});
|
||||||
return this.context.session.getCollectionService().getCollectionItemList(param);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user