Unofficial command line interface for Holiday API written in Rust.
Based on holidayapi-rust; Depends on clap
and confy
for arguments and configuration parsing.
Setting up key
$ hapi key -h
Usage: holidayapi-cli key [OPTIONS]
Options:
-k, --key <key>
-h, --help Print help information
Holidays endpoint
$ hapi holidays -h
Usage: hapi holiday [OPTIONS] --country <COUNTRY> --year <YEAR>
Options:
-k, --key <KEY> A temporary API key, won't be save to config, and overrides config for this request
-c, --countries <COUNTRY> For countries, ISO 3166-1 alpha-2 or ISO 3166-1 alpha-3 format
-y, --years <YEAR> year in ISO 8601 format
-m, --month <1-12> 1 or 2 digit month (1-12)
-d, --day <1-31> 1 or 2 digit day (1-31 depending on the month)
--public Return only public holidays
-s, --subdivisions Return state / province holidays alongside countrywide holidays
--search <SEARCH> Search holidays by name. Minimum 5 characters
-l, --language <LANGUAGE> ISO 639-1 format (with exceptions)
--previous Return the first day of holidays that occur before the specific date
--upcoming Return the first day of holidays that occur after the specific date
-f, --format <FORMAT> Response format (csv, json, php, tsv, yaml and xml) [default: json]
-p, --pretty Prettifies results to be more human-readable
-h, --help Print help information (use `--help` for more detail)
Countries endpoint
$ hapi countries -h
Usage: hapi country [OPTIONS]
Options:
-k, --key <KEY> A temporary API key, won't be save to config, and overrides config for this request
-c, --country <COUNTRY> Return only the country with the specified code
-s, --search <SEARCH> Search countries by code and name. Minimum 2 characters
--public Return only public holidays
-f, --format <FORMAT> Response format (csv, json, php, tsv, yaml and xml). [default: json]
-p, --pretty Prettifies results to be more human-readable
-h, --help Print help information