UNPKG

node-updown

Version:

Transparent Node.JS wrapper for the updown.io API

20 lines (19 loc) 687 B
import { GroupedMetrics, Metrics } from '../types/Metrics'; export interface GetMetricsOptions { /** * Start time, defaults to 1 month ago */ from?: string; /** * End time, defaults to now */ to?: string; } export interface GetGroupedMetricsOptions extends GetMetricsOptions { /** * Group data by hour ('time') or monitoring location ('host') */ group?: 'time' | 'host'; } export declare function getMetrics(apiKey: string, token: string, options?: GetMetricsOptions): Promise<Metrics>; export declare function getMetrics(apiKey: string, token: string, options: GetGroupedMetricsOptions): Promise<GroupedMetrics>;