Unofficial library for Holiday API written in Rust. This repo implements interface for original HolidayAPI endpoints seen here.
Add the following to your Cargo.toml
toml
[dependencies]
holidayapi_rust = "0.1.0"
```rs let holidayapi = HolidayAPI::new(VALIDKEY).unwrap();
// Fetch supported countries and subdivisions
let countries: Vec
// Fetch supported languages
let languages: Vec
// Fetch holidays with minimum parameters
let holidays: Vec
```
```rs let holidayapi = HolidayAPI::new(VALIDKEY).unwrap();
// Holidays
let specific_request: Vec<Holiday> = holiday_api
.holidays("jp", 2021)
.pretty(true)
.language("cn")
.public(true)
.get()
.await;
// Countries
let specific_request: Vec<Country> = holiday_api
.countries()
.search("hello world")
.country("US")
.public(true)
.get()
.await
.unwrap();
// Languages
let specific_request: Vec<Language> = holiday_api
.languages()
.search("chinese")
.pretty(true)
.get()
.await
.unwrap();
```