mirror of
https://github.com/holo-gfx/mangadex.git
synced 2024-11-28 18:18:22 -05:00
16 lines
492 B
JavaScript
16 lines
492 B
JavaScript
import Resource from './Resource'
|
|
export default class Group extends Resource {
|
|
static get resourceType() { return 'group' }
|
|
|
|
constructor(data = {}, responseCode = -1, responseStatus = null) {
|
|
super(data, responseCode, responseStatus)
|
|
this.id = data.id
|
|
this.name = data.name
|
|
}
|
|
|
|
static async load(id, cache = true) {
|
|
const json = await super.load(`group/${id}`, {})
|
|
return this.fromJSON(json.data, json.code, json.status, cache)
|
|
}
|
|
}
|