add api methods for getting statistics data for movies and shows
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
|||||||
OmdbSearch,
|
OmdbSearch,
|
||||||
Bestellung,
|
Bestellung,
|
||||||
Eintrittskarte,
|
Eintrittskarte,
|
||||||
StatisticsReduced, StatisticsFilm
|
StatisticsFilm, StatisticsVorstellung
|
||||||
} from '@infinimotion/model-frontend';
|
} from '@infinimotion/model-frontend';
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
import { inject, Injectable } from "@angular/core";
|
import { inject, Injectable } from "@angular/core";
|
||||||
@@ -195,8 +195,13 @@ export class HttpService {
|
|||||||
|
|
||||||
/* Statistics APIs */
|
/* Statistics APIs */
|
||||||
|
|
||||||
/* GET /api/statistics/list */
|
/* GET /api/statistics/movies */
|
||||||
getStatisticsList(): Observable<StatisticsReduced> {
|
getMovieStatistics(): Observable<StatisticsFilm[]> {
|
||||||
return this.http.get<StatisticsReduced>(`${this.baseUrl}statistics/list`)
|
return this.http.get<StatisticsFilm[]>(`${this.baseUrl}statistics/movies`)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* GET /api/statistics/shows */
|
||||||
|
getShowStatistics(): Observable<StatisticsVorstellung[]> {
|
||||||
|
return this.http.get<StatisticsVorstellung[]>(`${this.baseUrl}statistics/shows`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user