feat: Allow a user to filters elements on the API (#275)

This commit is contained in:
2024-10-10 14:56:11 +02:00
committed by GitHub
parent f2621890e1
commit bf54ab3809
28 changed files with 1429 additions and 126 deletions

24
src/models/SerieResume.ts Normal file
View File

@ -0,0 +1,24 @@
import type { Extension } from '../interfaces'
import Model from './Model'
import type Serie from './Serie'
export default class SerieResume extends Model {
public id!: string
public name!: string
public logo?: string
/**
* the the Card Image full URL
*
* @param {Quality} quality the quality you want your image to be in
* @param {Extension} extension extension you want you image to be
* @return the full card URL
*/
public getImageURL(extension: Extension = 'png'): string {
return `${this.logo}.${extension}`
}
public async getSerie(): Promise<Serie> {
return (await this.sdk.serie.get(this.id))!
}
}