mirror of
https://github.com/holidayapi/holidayapi-node.git
synced 2025-06-21 12:36:33 +00:00
* feat: pull country or language by code. This differs from the existing `search` functionality in that it allows you to explicitly pull back a single country or language instead of anything that matches (which could result in more items returned than expected). * refactor(types): add new types for the affected endpoints. * docs(readme): update to include examples for new functionality. * test: expand tests to include new parameters. * feat(package): upgrade dependencies to the latest versions. * fix(eslint): adjust configuration based on an updated dependency. * docs(license): bump the year of the license.
14 lines
555 B
TypeScript
14 lines
555 B
TypeScript
import { CountriesRequest, CountriesResponse, HolidaysResponse, HolidaysRequest, LanguagesRequest, LanguagesResponse } 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>;
|
|
}
|