import {Injectable} from '@angular/core'; import {HttpClient} from "@angular/common/http"; import {Observable} from "rxjs"; import {SourceType} from "../../openaireLibrary/monitor/entities/stakeholder"; import {properties} from "../../../environments/environment"; import {IndicatorUtils} from "../indicator-utils"; @Injectable({ providedIn: 'root' }) export class StatisticsService { indicatorsUtils = new IndicatorUtils(); constructor(private http: HttpClient) {} getNumbers(source: SourceType, url: string): Observable { if (source !== null) { return this.http.get(this.indicatorsUtils.getNumberUrl(source, url)); } else { return this.http.get(url); } } }