Created
February 11, 2018 19:34
-
-
Save kutliev/e33cca4ec8b0cb0308d65f4c081c32ee to your computer and use it in GitHub Desktop.
Data service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getSpotData(): Observable<any> { | |
let apiEndPoint = this.settings.ApiEndPoint + "object-type/spots" + "?read_key=" + this.settings.ApiReadKey; | |
return this.http.get(apiEndPoint).map((response: Response) => response.json().objects); | |
} | |
getSpotEvents(): Observable<any> { | |
let apiEndPoint = this.settings.ApiEndPoint + "object-type/spotevents" + "?read_key=" + this.settings.ApiReadKey; | |
return this.http.get(apiEndPoint).map((response: Response) => response.json().objects); | |
} | |
getSpots(): Observable<any> { | |
return Observable.forkJoin(this.getSpotData(), this.getSpotEvents()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment