Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data<TimeValueEntry> has no 'extra' attribute. valueAfterTimespan and valueBeforeTimespan are not set #130

Open
ChrisMalewski opened this issue Dec 17, 2020 · 0 comments

Comments

@ChrisMalewski
Copy link

ChrisMalewski commented Dec 17, 2020

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;
            }));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant