mirror of
https://github.com/zeldaret/website.git
synced 2026-09-30 07:21:50 -04:00
Update interface with project format.
This commit is contained in:
@@ -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<IResource[]>;
|
||||
|
||||
/**
|
||||
* Get all of the projects.
|
||||
*/
|
||||
getProjects(): Observable<IProject[]>;
|
||||
|
||||
/**
|
||||
* Get the CSV data for a project.
|
||||
*
|
||||
* @param filename The filename of the desired CSV.
|
||||
*/
|
||||
getProjectCSV(filename: string): Observable<string>;
|
||||
}
|
||||
|
||||
@@ -14,10 +14,18 @@ export class GamesService implements IGamesService {
|
||||
constructor(private http: HttpClient) { }
|
||||
|
||||
getSummaries(): Observable<ISummary[]> {
|
||||
return this.http.get<ISummary[]>("/assets/json/summaries.json")
|
||||
return this.http.get<ISummary[]>("/assets/json/summaries.json");
|
||||
}
|
||||
|
||||
getResources(): Observable<IResource[]> {
|
||||
return this.http.get<IResource[]>("/assets/json/resources.json")
|
||||
return this.http.get<IResource[]>("/assets/json/resources.json");
|
||||
}
|
||||
|
||||
getProjects(): Observable<IProject[]> {
|
||||
return this.http.get<IProject[]>("/assets/json/projects.json");
|
||||
}
|
||||
|
||||
getProjectCSV(filename: string): Observable<string> {
|
||||
return this.http.get<string>(`/assets/csv/${filename}.csv`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user