diff --git a/src/app/games/games.service.interface.ts b/src/app/games/games.service.interface.ts index 463f9ec..6bcd2c6 100644 --- a/src/app/games/games.service.interface.ts +++ b/src/app/games/games.service.interface.ts @@ -57,6 +57,24 @@ export interface IResource { tooltip?: string; } +/** + * Contains information about a decomp project and how to process the associated CSV data. + */ +export interface IProject { + slugs: string[]; + name: string; + matched: string; + unmatched: string; + columns: [ + { + type: string, + index: number | number[]; + name: string; + display: string + } + ] +} + /** * Functions to implement within "GamesService". */ @@ -72,4 +90,15 @@ export interface IGamesService { */ getResources(): Observable; + /** + * Get all of the projects. + */ + getProjects(): Observable; + + /** + * Get the CSV data for a project. + * + * @param filename The filename of the desired CSV. + */ + getProjectCSV(filename: string): Observable; } diff --git a/src/app/games/games.service.ts b/src/app/games/games.service.ts index a2b0a10..87c20b9 100644 --- a/src/app/games/games.service.ts +++ b/src/app/games/games.service.ts @@ -14,10 +14,18 @@ export class GamesService implements IGamesService { constructor(private http: HttpClient) { } getSummaries(): Observable { - return this.http.get("/assets/json/summaries.json") + return this.http.get("/assets/json/summaries.json"); } getResources(): Observable { - return this.http.get("/assets/json/resources.json") + return this.http.get("/assets/json/resources.json"); + } + + getProjects(): Observable { + return this.http.get("/assets/json/projects.json"); + } + + getProjectCSV(filename: string): Observable { + return this.http.get(`/assets/csv/${filename}.csv`); } }