openaire-library/utils/indexInfo.service.ts

23 lines
614 B
TypeScript

import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {EnvProperties} from './properties/env-properties';
@Injectable()
export class IndexInfoService {
constructor(private http: HttpClient) {
}
// http://beta.services.openaire.eu/openaire/info/lastLoadDate
// the date when the mining results currently in the public index have been generated: http://beta.services.openaire.eu/openaire/info/lastMiningDate
getLastIndexDate(properties: EnvProperties): any {
let url = properties.indexInfoAPI + "lastLoadDate";
return this.http.get(url);
}
}