<commit_before>import {Component} from '@angular/core';

@Component({
	selector: 'calendar',
	templateUrl: 'app/templates/calendar.component.html',
	styleUrls: ['app/app.css']
})

export class CalendarComponent {

	constructor(private http: Http) {}


	getCalendar() :  Observable<CalendarData[]>   {

		return this.http.get('../lib/apis/event/index.php').map(this.extractData).catch(this.handleError);

	}

	extractData (response: Response) {

		if(response.status < 200 || response.status >= 300) {
			throw(new Error("Bad response status: " + response.status));
		}

		let reply = [];
		let body = response.json();
		body.forEach(function(item) {
			let clndr = {eventName: item.FIELD1, eventTime: item.FIELD2};
			reply.push(clndr);
		});
		return(reply);

	}

	private handleError(error: any) {
		let message = error.message;
		console.log(message);
		return(Observable.throw(message));
	}
}<commit_msg>Updated Calendar Component<commit_after>import {Component} from "@angular/core";

@Component({
	templateUrl: "./templates/calendar.html"
})
export class CalendarComponent {}
{'fraction_non_alphanumeric': 0.16003700277520813, 'fraction_numerical': 0.0074005550416281225, 'mean_word_length': 4.786096256684492, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5611569', 'n_tokens_mistral': 375, 'n_tokens_neox': 338, 'n_words': 67}