Open ChrisMalewski opened 3 years ago
getObservations(dataset: ApiV3Dataset, from: Date, to: Date): Observable<TimeValueEntry[]> {
const ids: string[] = SwappDatasetUtils.splitServiceIdSeriesId(dataset.internalId); return this.helgolandApi.getTsData<TimeValueEntry>( ids[1], ids[0], { from: from.getTime(), to: to.getTime() }, { expanded: true }).pipe( map((r: any) => { const out: IdentifiedTimeValueEntry[] = r.values; if (r.extra?.valueAfterTimespan) { out.push(r.valueAfterTimespan); } if (r.extra?.valueBeforeTimespan) { out.push(r.valueBeforeTimespan); } return out; })); }
getObservations(dataset: ApiV3Dataset, from: Date, to: Date): Observable<TimeValueEntry[]> {