Files
WebApp/src/app/api/fn/eeg/study.ts
T
Roberto Treviño 2811961a5a ISSSTELEON WebApp
2026-11-29 18:11:45 -06:00

28 lines
972 B
TypeScript

import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { filter, map } from 'rxjs/operators';
import { StrictHttpResponse } from '../../strict-http-response';
import { RequestBuilder } from '../../request-builder';
import { Analysis } from '../../models/analysis';
export interface Study$Params {
eeg_id: string;
}
export function study(
http: HttpClient,
rootUrl: string,
params: Study$Params,
context?: HttpContext,
): Observable<StrictHttpResponse<Analysis>> {
const rb = new RequestBuilder(rootUrl, study.PATH, 'get');
if (params) {
rb.path('eeg_id', params.eeg_id, {});
}
return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(
filter((r: any): r is HttpResponse<any> => r instanceof HttpResponse),
map((r: HttpResponse<any>) => {
return r as StrictHttpResponse<Analysis>;
}),
);
}
study.PATH = '/tea/eegs/{eeg_id}';