mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
feat: card
This commit is contained in:
parent
cd0793655d
commit
ce3c509cd9
43 changed files with 508 additions and 7 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { getSquareBangboo } from '../lib/download.js';
|
||||
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
|
|
@ -19,6 +21,11 @@ export class Buddy {
|
|||
this.level = level;
|
||||
this.star = star;
|
||||
}
|
||||
|
||||
async get_assets() {
|
||||
const result = await getSquareBangboo(this.id);
|
||||
this.square_icon = result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -39,6 +46,11 @@ export class Item {
|
|||
this.level = level;
|
||||
this.star = star;
|
||||
}
|
||||
|
||||
async get_assets() {
|
||||
const result = await getSquareBangboo(this.id);
|
||||
this.square_icon = result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -67,4 +79,10 @@ export class ZZZBangbooResp {
|
|||
this.items = items;
|
||||
this.bangboo_wiki = bangboo_wiki;
|
||||
}
|
||||
|
||||
async get_assets() {
|
||||
for (const item of this.items) {
|
||||
await item.get_assets();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue