| Crates.io | holiday_api_rust |
| lib.rs | holiday_api_rust |
| version | 0.3.2 |
| created_at | 2020-01-22 07:40:41.377517+00 |
| updated_at | 2020-06-23 06:32:04.862067+00 |
| description | The Holiday API client wrapper written in Rust. |
| homepage | https://github.com/guibranco/holiday-api-rust |
| repository | https://github.com/guibranco/holiday-api-rust.git |
| max_upload_size | |
| id | 200973 |
| size | 84,372 |
The HolidayAPI client wrapper written in Rust.
| Service | Status |
|---|---|
| AppveyorCI | |
| crates.io |
Pure Rust bindings to the Holiday API.
holiday-api-rust is intended to work on all tier 1 supported Rust systems:
Due to the use of certain features holiday-api-rust requires rustc version 1.18 or
higher.
Add the following to your Cargo.toml
[dependencies]
holiday_api_rust = "0.3.1"
serde_json = "1.0"
Then in your lib.rs or main.rs file add:
extern crate holiday_api_rust;
let client = HolidayAPIClient::new("HolidayAPI key here");
match client.search_holidays("2019", "BR") {
Err(e) => eprintln!("{:?}", e),
Ok(holidays) => {
for holiday in holidays {
println!("Holiday: {} | Date: {} | Country: {}", holiday.name, holiday.date, holiday.country);
}
}
}
Licensed under