working updates

This commit is contained in:
2018-03-31 17:35:30 -04:00
parent 2a3b0509a8
commit 7ad3c6b93a
12 changed files with 3329 additions and 39 deletions

View File

@@ -15,14 +15,50 @@ const httpOptionsPut = {
@Injectable()
export class GamesService {
APIURL = "http://www.lazypug.net/api.php";
APIURL = "http://192.241.155.78/ludosdata/api.php";
constructor(
private http: HttpClient
){ }
getGames( queryFilters, querryPage, queryOrder ): Observable<any> {
return this.http.get( this.APIURL + "/games?filter="+ queryFilters +"&page="+ querryPage +"&order="+ queryOrder +"&transform=1" )
getGames( queryFilters, querryPage, queryOrder, queryRecordMax ): Observable<any> {
return this.http.get( this.APIURL + "/games?filter="+ queryFilters +"&page="+ querryPage + "," + queryRecordMax +"&order="+ queryOrder +"&transform=1" )
.map(res => {
return(
res
);
});
}
postGame( gameData ): Observable<any> {
return this.http.post( this.APIURL + "/games/", gameData, httpOptions )
.map(res => {
return(
res
);
});
}
getGameById( gameId ): Observable<any> {
return this.http.get( this.APIURL + "/games/" + gameId )
.map(res => {
return(
res
);
});
}
putGameById( gameData, gameId ): Observable<any> {
return this.http.get( this.APIURL + "/games/" + gameId )
.map(res => {
return(
res
);
});
}
deleteGameById( gameId ): Observable<any> {
return this.http.get( this.APIURL + "/games/" + gameId )
.map(res => {
return(
res