2020-08-08 18:23:29 +02:00
|
|
|
import { injectable } from 'inversify';
|
|
|
|
import { inject } from '../../core/inject';
|
2021-01-06 02:35:46 +01:00
|
|
|
import type { NhentaiAppWindowInterface } from './nhentai-app-window-interface';
|
2020-02-08 23:26:57 +01:00
|
|
|
|
|
|
|
@injectable()
|
2021-01-06 02:35:46 +01:00
|
|
|
export class NhentaiApi implements NhentaiApiInterface {
|
|
|
|
private readonly appWindow: NhentaiAppWindowInterface;
|
2020-02-08 23:26:57 +01:00
|
|
|
|
2021-01-06 02:35:46 +01:00
|
|
|
public constructor(@inject('nhentai-app-window') appWindow: NhentaiAppWindowInterface) {
|
2020-11-09 18:15:30 +01:00
|
|
|
this.appWindow = appWindow;
|
2020-02-08 23:26:57 +01:00
|
|
|
}
|
|
|
|
|
2020-11-09 18:15:30 +01:00
|
|
|
public getFavorites(): Promise<NodeJS.ReadableStream> {
|
|
|
|
return this.appWindow.getFavorites();
|
2020-02-08 23:26:57 +01:00
|
|
|
}
|
|
|
|
}
|