Added developers and publishers field to games
OMDB doesn't have this field so I mapped it to be empty.
This commit is contained in:
parent
1424c0cef6
commit
8bb8c2d791
3 changed files with 8 additions and 0 deletions
|
|
@ -200,6 +200,8 @@ export class OMDbAPI extends APIModel {
|
|||
url: `https://www.imdb.com/title/${result.imdbID}/`,
|
||||
id: result.imdbID,
|
||||
|
||||
developers: [],
|
||||
publishers: [],
|
||||
genres: result.Genre?.split(', ') ?? [],
|
||||
onlineRating: Number.parseFloat(result.imdbRating ?? 0),
|
||||
image: result.Poster ?? '',
|
||||
|
|
|
|||
|
|
@ -105,6 +105,8 @@ export class SteamAPI extends APIModel {
|
|||
url: `https://store.steampowered.com/app/${result.steam_appid}`,
|
||||
id: result.steam_appid,
|
||||
|
||||
developers: result['developers'],
|
||||
publishers: result['publishers'],
|
||||
genres: result.genres?.map((x: any) => x.description) ?? [],
|
||||
onlineRating: Number.parseFloat(result.metacritic?.score ?? 0),
|
||||
image: result.header_image ?? '',
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import { mediaDbTag, migrateObject } from '../utils/Utils';
|
|||
import { MediaType } from '../utils/MediaType';
|
||||
|
||||
export class GameModel extends MediaTypeModel {
|
||||
developers: string[];
|
||||
publishers: string[];
|
||||
genres: string[];
|
||||
onlineRating: number;
|
||||
image: string;
|
||||
|
|
@ -18,6 +20,8 @@ export class GameModel extends MediaTypeModel {
|
|||
constructor(obj: any = {}) {
|
||||
super();
|
||||
|
||||
this.developers = undefined;
|
||||
this.publishers = undefined;
|
||||
this.genres = undefined;
|
||||
this.onlineRating = undefined;
|
||||
this.image = undefined;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue