Return of the test API and update readme

This commit is contained in:
mProjectsCode 2022-05-26 20:20:00 +02:00
parent 3b1e500317
commit f6825bbadc
3 changed files with 66 additions and 8 deletions

27
src/tests/TestAPI.ts Normal file
View file

@ -0,0 +1,27 @@
import {APIModel} from '../api/APIModel';
import {MediaTypeModel} from '../models/MediaTypeModel';
import MediaDbPlugin from '../main';
export class TestAPI extends APIModel {
plugin: MediaDbPlugin;
constructor(plugin: MediaDbPlugin) {
super();
this.plugin = plugin;
this.apiName = 'TestAPI';
this.apiDescription = 'A test API for automated testing.';
this.apiUrl = '';
this.types = [];
}
async getById(item: MediaTypeModel): Promise<MediaTypeModel> {
return undefined;
}
async searchByTitle(title: string): Promise<MediaTypeModel[]> {
return [] as MediaTypeModel[];
}
}