(account: string, container: string, filepath: string, signal: AbortSignal)
| 52 | } |
| 53 | |
| 54 | async track(account: string, container: string, filepath: string, signal: AbortSignal): Promise<number[][]> { |
| 55 | if (!account || !container || !filepath) { |
| 56 | return null; |
| 57 | } |
| 58 | const response = await this.authUtil.requestWithAuthIfRequired({ |
| 59 | method: 'get', |
| 60 | url: `/api/datasources/${account}/${container}/${filepath}/track`, |
| 61 | signal: signal, |
| 62 | }); |
| 63 | if (response.status !== 200) { |
| 64 | throw new Error(`Unexpected status code: ${response.status}`); |
| 65 | } |
| 66 | if (!response.data) { |
| 67 | return null; |
| 68 | } |
| 69 | return response.data.iqengine_geotrack.coordinates.map((coord) => { |
| 70 | if (coord.length < 3) { |
| 71 | return []; |
| 72 | } |
| 73 | return [coord[1], coord[0]]; |
| 74 | }); |
| 75 | |
| 76 | } |
| 77 | |
| 78 | async queryMeta(queryString: string): Promise<SigMFMetadata[]> { |
| 79 | const response = await this.authUtil.requestWithAuthIfRequired({ |
nothing calls this directly
no test coverage detected