Channel component
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
const API_BASE_URL = '/lightning/api/v1';
|
||||
@@ -16,8 +16,16 @@ export class LightningApiService {
|
||||
return this.httpClient.get<any>(API_BASE_URL + '/nodes/' + publicKey);
|
||||
}
|
||||
|
||||
getChannel$(shortId: string): Observable<any> {
|
||||
return this.httpClient.get<any>(API_BASE_URL + '/channels/' + shortId);
|
||||
}
|
||||
|
||||
getChannelsByNodeId$(publicKey: string): Observable<any> {
|
||||
return this.httpClient.get<any>(API_BASE_URL + '/channels/' + publicKey);
|
||||
let params = new HttpParams()
|
||||
.set('public_key', publicKey)
|
||||
;
|
||||
|
||||
return this.httpClient.get<any>(API_BASE_URL + '/channels', { params });
|
||||
}
|
||||
|
||||
getLatestStatistics$(): Observable<any> {
|
||||
|
||||
Reference in New Issue
Block a user