day one build

This commit is contained in:
2018-02-26 23:14:37 -05:00
parent 4196aa268a
commit c425c1542f
38 changed files with 13284 additions and 0 deletions

33
src/app/games.service.ts Normal file
View File

@@ -0,0 +1,33 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
const httpOptions = {
headers: new HttpHeaders({ 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' })
//headers: new HttpHeaders({ 'Content-Type': 'application/json' })
}
const httpOptionsPut = {
headers: new HttpHeaders({ 'Content-Type': 'application/json' })
}
@Injectable()
export class GamesService {
APIURL = "http://www.lazypug.net/api.php";
constructor(
private http: HttpClient
){ }
getGames( ): Observable<any> {
return this.http.get( this.APIURL + "/games?filter=Played,eq,true&page=1&order=Title&transform=1" )
.map(res => {
return(
res
);
});
}
}