feat: add search capability to all calls

* chore: Updated dependencies.
* test: Fixed a linter issue in the test suite.
* feat: Updated all requests to contain the `search` property.
* chore: Cleaned up some of the type properties order (alphabetized).
* test: Added tests to cover the search capabilities.
* docs: Added examples to the readme to cover all endpoints as well as search.
* docs: Updated the readme to cover migrating from v1 to v2.
* docs: Fixed repository links where applicable.
* chore: Bumped the minor version number.
This commit is contained in:
Josh Sherman 2019-10-03 22:17:27 -05:00
parent 80d96a68ef
commit e36a998229
7 changed files with 238 additions and 76 deletions

8
dist/types.d.ts vendored
View file

@ -1,21 +1,21 @@
export declare type Endpoint = 'countries' | 'holidays' | 'languages';
export declare type Request = {
key?: string;
format?: 'csv' | 'json' | 'php' | 'tsv' | 'yaml' | 'xml';
key?: string;
pretty?: boolean;
search?: string;
};
export declare type Requests = Request | HolidaysRequest;
export declare type HolidaysRequest = Request & {
country?: string;
year?: number;
day?: number;
month?: number;
language?: string;
month?: number;
previous?: boolean;
public?: boolean;
search?: string;
subdivisions?: boolean;
upcoming?: boolean;
year?: number;
};
export declare type Response = {
requests: {