@@ -13,9 +13,9 @@ declare module 'delphi_epidata' {
13
13
}
14
14
export type EpiDataCallback = ( result : number , message : string , epidata : EpiDataResponse [ 'epidata' ] ) => void ;
15
15
16
- export class Epidata {
17
- BASE_URL : string ;
18
- constructor ( baseUrl ?: string ) ;
16
+ export interface EpidataFunctions {
17
+ readonly BASE_URL : string ;
18
+ withURL ( baseUrl ?: string ) : EpidataFunctions ;
19
19
20
20
fluview ( callback : EpiDataCallback , regions : StringParam , epiweeks : EpiRangeParam , issues ?: EpiRangeParam , lag ?: number , auth ?: string ) : Promise < EpiDataResponse > ;
21
21
fluview_meta ( callback : EpiDataCallback ) : Promise < EpiDataResponse > ;
@@ -41,9 +41,12 @@ declare module 'delphi_epidata' {
41
41
covid_hosp_facility ( callback : EpiDataCallback , hospital_pks : StringParam , collection_weeks : EpiRangeParam , publication_dates : EpiRangeParam ) : Promise < EpiDataResponse > ;
42
42
covid_hosp_facility_lookup ( callback : EpiDataCallback , state ?: string , ccn ?: string , city ?: string , zip ?: string , fips_code ?: string ) : Promise < EpiDataResponse > ;
43
43
}
44
- export class EpidataAsync {
45
- BASE_URL : string ;
46
- constructor ( baseUrl ?: string ) ;
44
+
45
+ export const Epidata : EpidataFunctions ;
46
+
47
+ export interface EpidataAsyncFunctions {
48
+ readonly BASE_URL : string ;
49
+ withURL ( baseUrl ?: string ) : EpidataAsyncFunctions ;
47
50
48
51
fluview ( regions : StringParam , epiweeks : EpiRangeParam , issues ?: EpiRangeParam , lag ?: number , auth ?: string ) : Promise < EpiDataResponse > ;
49
52
fluview_meta ( ) : Promise < EpiDataResponse > ;
@@ -69,4 +72,6 @@ declare module 'delphi_epidata' {
69
72
covid_hosp_facility ( hospital_pks : StringParam , collection_weeks : EpiRangeParam , publication_dates : EpiRangeParam ) : Promise < EpiDataResponse > ;
70
73
covid_hosp_facility_lookup ( state ?: string , ccn ?: string , city ?: string , zip ?: string , fips_code ?: string ) : Promise < EpiDataResponse > ;
71
74
}
75
+
76
+ export const EpidataAsync : EpidataAsyncFunctions ;
72
77
}
0 commit comments