blob: 6da058153599f295d56ec73bd60fc3111abb1ce5 [file] [log] [blame]
/**
******************************************************************************
* Copyright © 2018 PTA GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
* http://www.eclipse.org/legal/epl-v10.html
*
******************************************************************************
*/
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map';
import 'rxjs/add/observable/throw';
import { SessionContext } from '../common/session-context';
import { BaseHttpService, HttpCallInfo, HttpMethodEn } from './base-http.service';
import { Globals } from '../common/globals';
@Injectable()
export class ReminderService {
constructor(
private baseHttpService: BaseHttpService,
private sessionContext: SessionContext,
) {
}
getCurrentReminders(): Observable<number[]> {
return this.baseHttpService.callService(
new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getCurrentReminders', null),
this.sessionContext);
}
getExpiredReminders(): Observable<number[]> {
return this.baseHttpService.callService(
new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getExpiredReminders', null),
this.sessionContext);
}
}