feat: abstract classes and destroy subscriptions
This commit is contained in:
18
apps/NwaifuAnime/src/app/services/parsers/parser.ts
Normal file
18
apps/NwaifuAnime/src/app/services/parsers/parser.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { HttpClient } from "@angular/common/http";
|
||||
import { Injectable } from "@angular/core";
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
@Injectable({ providedIn: "root" })
|
||||
export abstract class Parser {
|
||||
constructor(protected http: HttpClient) {}
|
||||
|
||||
protected abstract url: string;
|
||||
|
||||
abstract searchManga(query: string): Observable<object>;
|
||||
|
||||
abstract getDetails(slug_url: string): Observable<object>;
|
||||
|
||||
abstract getChapters(url: string): Observable<object>;
|
||||
|
||||
abstract getChapter(url: string, chapter: string, volume: string): Observable<object>;
|
||||
}
|
||||
Reference in New Issue
Block a user