32 lines
987 B
TypeScript
32 lines
987 B
TypeScript
|
import {Injectable} from "@angular/core";
|
||
|
import {HttpClient} from "@angular/common/http";
|
||
|
import {environment} from "../../environments/environment";
|
||
|
|
||
|
@Injectable({
|
||
|
providedIn: "root"
|
||
|
})
|
||
|
export class OaipmhValidatorService {
|
||
|
|
||
|
constructor(private http: HttpClient) {}
|
||
|
|
||
|
getAnalysis(jobId: string) {
|
||
|
let url: string = environment.validatorAPI + "reports/getResultsByJobId?jobId="+jobId;
|
||
|
return this.http.get(url);
|
||
|
}
|
||
|
|
||
|
getWarnings(jobId: string, ruleName: string) {
|
||
|
let url: string = environment.validatorAPI + "reports/getWarningsReport?jobId="+jobId+"&ruleName="+ruleName;
|
||
|
return this.http.get<any>(url);
|
||
|
}
|
||
|
|
||
|
getErrors(jobId: string, ruleName: string) {
|
||
|
let url:string = environment.validatorAPI + "reports/getErrorsReport?jobId="+jobId+"&ruleName="+ruleName;
|
||
|
return this.http.get<any>(url);
|
||
|
}
|
||
|
|
||
|
getJobResult(jobId: string) {
|
||
|
let url: string = environment.validatorAPI + "reports/getJobResult?jobId="+jobId;
|
||
|
return this.http.get(url);
|
||
|
}
|
||
|
}
|