2020-08-08 18:23:29 +02:00
|
|
|
import { injectable } from 'inversify';
|
|
|
|
import { inject } from '../../core/inject';
|
2020-04-10 05:02:19 +02:00
|
|
|
import { INhentaiApi } from './i-nhentai-api';
|
2020-11-09 18:15:30 +01:00
|
|
|
import { INhentaiAppWindow } from './i-nhentai-app-window';
|
2020-02-08 23:26:57 +01:00
|
|
|
|
|
|
|
@injectable()
|
|
|
|
export class NhentaiApi implements INhentaiApi {
|
2020-11-09 18:15:30 +01:00
|
|
|
private readonly appWindow: INhentaiAppWindow;
|
2020-02-08 23:26:57 +01:00
|
|
|
|
2020-11-09 18:15:30 +01:00
|
|
|
public constructor(@inject('nhentai-app-window') appWindow: INhentaiAppWindow) {
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|