integration layer; merge work on indicators from forks with existing ingestion pipeline
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { DataPage } from './api.types';
|
||||
|
||||
/** GET /data/<target>: rows actually stored in the destination database. */
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class DataApi {
|
||||
private readonly http = inject(HttpClient);
|
||||
|
||||
page(target: string, limit: number, offset: number): Observable<DataPage> {
|
||||
const params = new HttpParams().set('limit', limit).set('offset', offset);
|
||||
return this.http.get<DataPage>(`/data/${encodeURIComponent(target)}`, { params });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user