mirror of
https://github.com/holidayapi/holidayapi-node.git
synced 2025-06-21 04:26:33 +00:00
Added support for our latest endpoint, which calculates the workday a given number of business days into the future from the given date for the given country. Also: * perf: updated dependencies * ci: pinned eslint to 7.2.x due to airbnb incompatibility with 7.3.x. * ci: tweaked / improved eslint rules a bit. * refactor: updated types to use `;` and include weekday response. * docs: added example for new endpoint.
15 lines
653 B
TypeScript
15 lines
653 B
TypeScript
import { CountriesRequest, CountriesResponse, HolidaysRequest, HolidaysResponse, LanguagesRequest, LanguagesResponse, WorkdayRequest, WorkdayResponse } from './types';
|
|
export declare class HolidayAPI {
|
|
baseUrl: string;
|
|
key: string;
|
|
constructor({ key, version }: {
|
|
key?: string;
|
|
version?: number;
|
|
});
|
|
private createUrl;
|
|
private request;
|
|
countries(request?: CountriesRequest): Promise<CountriesResponse>;
|
|
holidays(request?: HolidaysRequest): Promise<HolidaysResponse>;
|
|
languages(request?: LanguagesRequest): Promise<LanguagesResponse>;
|
|
workday(request?: WorkdayRequest): Promise<WorkdayResponse>;
|
|
}
|