Store and display stats and node top lists

This commit is contained in:
softsimon
2022-04-27 02:52:23 +04:00
parent 3e6af8e87b
commit 8d622e3606
32 changed files with 663 additions and 35 deletions

View File

@@ -0,0 +1,22 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
const API_BASE_URL = '/lightning/api/v1';
@Injectable({
providedIn: 'root'
})
export class LightningApiService {
constructor(
private httpClient: HttpClient,
) { }
getLatestStatistics$(): Observable<any> {
return this.httpClient.get<any>(API_BASE_URL + '/statistics/latest');
}
listTopNodes$(): Observable<any> {
return this.httpClient.get<any>(API_BASE_URL + '/nodes/top');
}
}