1 |
50169
|
argiro.kok
|
import {Injectable} from '@angular/core';
|
2 |
55982
|
argiro.kok
|
import {HttpClient} from '@angular/common/http';
|
3 |
55581
|
argiro.kok
|
import {EnvProperties} from './properties/env-properties';
|
4 |
58723
|
k.triantaf
|
import {Observable, of} from "rxjs";
|
5 |
|
|
import {catchError} from "rxjs/operators";
|
6 |
50169
|
argiro.kok
|
|
7 |
|
|
|
8 |
58723
|
k.triantaf
|
@Injectable({
|
9 |
|
|
providedIn: "root"
|
10 |
|
|
})
|
11 |
55581
|
argiro.kok
|
export class IndexInfoService {
|
12 |
50169
|
argiro.kok
|
|
13 |
55982
|
argiro.kok
|
constructor(private http: HttpClient) {
|
14 |
55581
|
argiro.kok
|
}
|
15 |
50169
|
argiro.kok
|
|
16 |
55581
|
argiro.kok
|
// http://beta.services.openaire.eu/openaire/info/lastLoadDate
|
17 |
|
|
// the date when the mining results currently in the public index have been generated: http://beta.services.openaire.eu/openaire/info/lastMiningDate
|
18 |
58723
|
k.triantaf
|
getLastIndexDate(properties: EnvProperties): Observable<any> {
|
19 |
|
|
let url = properties.indexInfoAPI + "claim_load_date";
|
20 |
|
|
return this.http.get(url).pipe(catchError(err => {return of(null)}));
|
21 |
55581
|
argiro.kok
|
}
|
22 |
|
|
}
|
23 |
50169
|
argiro.kok
|
|
24 |
|
|
|