UNPKG

what-to-play

Version:

Score aggregator for lists of games

36 lines (35 loc) 2.06 kB
import * as gog from "./gog"; import * as hltb from "./howlongtobeat"; import * as metacritic from "./metacritic"; import * as steam from "./steam"; import { MetacriticPlatform } from "./platform"; export interface AllData { game: string; aggregateScore?: number; gog?: gog.GogResult; hltb?: hltb.HowLongToBeatResult; metacritic?: metacritic.MetacriticResult; steam?: steam.SteamResult; } export declare const csvHeaders: readonly ["Game", "Aggregate Score", "Metacritic Name", "Metacritic Critic Score", "Metacritic User Score", "Metacritic Release Date", "Steam Name", "Steam All Time % Positive", "Steam Recent % Positive", "Steam Release Date", "GOG Name", "GOG Score", "How Long to Beat Name", "How Long to Beat: Main Story", "How Long to Beat: Main Story + Extra", "How Long to Beat: Completionist"]; export declare const csvHeaderRow: string; export type CsvHeaders = typeof csvHeaders[number]; export declare function aggregateScore(gogData?: gog.GogResult, metacriticData?: metacritic.MetacriticResult, steamResult?: steam.SteamResult): number | undefined; /** * @param game Game to get data for * @param platforms An array of platforms to consider Metacritic reviews for * @param country 2-character country code defined by "ISO 3166-1 alpha-2", used by Steam */ export declare function getCsv(game: string, platforms: MetacriticPlatform[], country: string): Promise<string>; /** * @param game Game to get data for * @param platforms An array of platforms to consider Metacritic reviews for * @param country 2-character country code defined by "ISO 3166-1 alpha-2", used by Steam */ export declare function getData(game: string, platforms: MetacriticPlatform[], country: string): Promise<AllData>; /** * @param game Game to get data for * @param platforms An array of platforms to consider Metacritic reviews for * @param country 2-character country code defined by "ISO 3166-1 alpha-2", used by Steam */ export declare function getJson(game: string, platforms: MetacriticPlatform[], country: string): Promise<string>;