feat: abstract classes and destroy subscriptions

This commit is contained in:
2024-07-08 23:24:03 +03:00
parent 9d2373a298
commit 6833105604
13 changed files with 191 additions and 100 deletions

View 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>;
}