Example #1
0
 getTitles(){
    return this._http.get("app/test/bookTitles.txt").map( data => data.text().split('\n'));
 }
 getAllResults(){
     var url = 'results/all';
     return this.http.get(url)
         .map(res => res.json());
 }
 getLastGameData(gameMode: string){
     var url = 'last_game_data/' + gameMode;
     return this.http.get(url)
         .map(res => res.json());
 }
 getPost(id: string) {
     return this._http.get(`http://jsonplaceholder.typicode.com/posts/${id}`)
         .map((response) => response.json());
 }
Example #5
0
  getEvento(id: number) {
	    return this.http.get(URL+id)
	      .map(response => response.json())
	      .catch(error => this.handleError(error));
  }
 get(id: number) {
     return this._http.get(this.baseAPIUrl + 'user/' + id + '/', this.getHeaders()).map(res => res.json())
 }
Example #7
0
 getData():Observable<any> {
     return this._http.get('https://sweltering-fire-7229.firebaseio.com/data.json')
         .map(respone=> respone.json());
 }
	getInterests(){
		return this.http.get('./api/interests').map(res => {
			return res.json().interests;
		});
	}
	getNames(){
		return this.http.get('./getUsers.php').map(res => {
			return res.json();
		});
	}
Example #10
0
 getGoogleUser() {
   return this.http.get('/api/google-auth/user')
     .map(res => res.json())
     .do((data) => localStorage.setItem('token', data.token))
     .catch(this.handleError);
 }
	getUsers(){
		return this.http.get('./api/signups').map(res => {
			return res.json().signups;
		});
	}
 getNews():Observable<News[]> {
     return this.http.get(this.configuration.apiBasePath + '/news/')
         .map(res => res.json())
         .catch(this.logger.errorCatcher());
 }
 getResults (query) {
     
   return this.http.get(`${BASE_URL}?q=${query}%20-channel&maxResults=50&part=snippet,id&key=${API_TOKEN}`)
                   .map(res => res.json().items)
                   .catch(this.handleError);
 }
 getData() {
   return this._http
     .get(MOCK_DATA_URI)
     .map(res => res.json());
 }
Example #15
0
	getJSONData() {
		return this._http.get('resources/json/schedules.json')
			//Extract the HTTP response to a JSON object
			.map(res => res.json());
	}
 getUsers(sinceValue:number):Observable<User[]>{
     return this._http.get('https://api.github.com/users?per_page=10&since='+sinceValue).map(res=>res.json());
 }
 listNextPage(url: string) {
     return this._http.get(url, this.getHeaders()).map(res => res.json())
 } 
 getUserRepos(login:string):Observable<User>{
     return this._http.get('https://api.github.com/users/'+login+'/repos').map(res=>res.json());
 }
 public getContentRaw(url: string): any {
     return this.http
         .get(url)
         .map((res: Response) => res.text());
 }
 getUserFollowing(login:string,perPage:number,pageNumber:number):Observable<User>{
     return this._http.get('https://api.github.com/users/'+login+'/following?per_page='+perPage+'&page='+pageNumber).map(res=>res.json()) ;
 }
Example #21
0
 getPosts() {
     return this._http.get('http://jsonplaceholder.typicode.com/posts')
         .map((response) => response.json());
 }
 constructor(http:Http) {
   this.people = http.get('https://randomuser.me/api/')
     .map(response => response.json());
 }
Example #23
0
 getEventos() {
   return this.http.get(URL)
     .map(response => response.json())
     .catch(error => this.handleError(error));
 }
Example #24
0
 getStats() {
     return this.http.get('http://broadcast.smoothtraxx.gr:8000/status-json.xsl')
         .map(res => res.json())
         .catch(this.handleError);
 }
Example #25
0
 loadItems() {
   this.http.get(BASE_URL)
     .map(res => res.json())
     .map(payload => ({ type: 'ADD_ITEMS', payload }))
     .subscribe(action => this.store.dispatch(action));
 }
Example #26
0
 getSongInfo(artist, title, album) {
     return this.http.get(`http://smoothtraxx-api.herokuapp.com/api/tracks?conditions={"artist":"${artist}","title":"${title}","album":"${album}"}`)
         .map(res => res.json())
         .catch(this.handleError);
 }
 getRecentResults(gameMode: string){
     var url = 'recent/' + gameMode;
     return this.http.get(url)
         .map(res => res.json());
 }
 getVendorDetail(vendro_id){
     let response = this.http.get('http://104.131.117.45/api/v1/vendor/details/'+vendro_id);
     return response;
 }
 getGamesPlayedToday(gameMode: string){
     var url = 'games_played_today/' + gameMode;
     return this.http.get(url)
         .map(res => res.json().count);
 }
Example #30
0
 getPost(id):Observable<Post> {
     return this.http.get(this.url + "/" + id)
         .map(res => res.json())
         .catch(this.handleError);
 }