ngx-endpoints
Version:
A library to dynamically load data from http endpoints / urls in angular
23 lines (22 loc) • 849 B
TypeScript
import { NgxEndpointService } from '../ngx-endpoints.service';
import { NgxEndPoint } from '../ngx-endpoints';
import { NgxEndPointData } from '../ngx-endpoint.format';
export declare class NgxLiveEndPoint<T> extends NgxEndPoint<T> {
endpointservice: NgxEndpointService;
endpoint: NgxEndPointData;
constructor(endpointservice: NgxEndpointService, endpoint: NgxEndPointData);
/**
* Requests data from an http source
* Optionally converts relative dates (now-1d) into readable urls by DatesOutputFormat
* Adds the result of the request to BehaviorSubject data that can be subscribed
*/
requestData(): Promise<void>;
/**
* internal function to wait before next live request will be made
*/
private sleep;
/**
* internal function to run live requests in loop
*/
private refreshData;
}