Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guibranco/holiday-api-rust
:calendar: :gear: Holiday API Rust SDK (API Client)
https://github.com/guibranco/holiday-api-rust
api api-client api-client-rust client-wrapper hacktoberfest holiday-api-rust holidayapi rust
Last synced: 11 days ago
JSON representation
:calendar: :gear: Holiday API Rust SDK (API Client)
- Host: GitHub
- URL: https://github.com/guibranco/holiday-api-rust
- Owner: guibranco
- License: mit
- Created: 2020-01-21T07:06:18.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-08-30T13:31:18.000Z (2 months ago)
- Last Synced: 2024-10-26T12:39:34.207Z (18 days ago)
- Topics: api, api-client, api-client-rust, client-wrapper, hacktoberfest, holiday-api-rust, holidayapi, rust
- Language: Rust
- Homepage: https://guibranco.github.io/holiday-api-rust/
- Size: 123 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# HolidayAPI Rust client
📆⚙️ [HolidayAPI](https://holidayapi.com/docs) client wrapper for Rust projects.
![GitHub last commit (branch)](https://img.shields.io/github/last-commit/guibranco/holiday-api-rust/main)
![Crates.io](https://img.shields.io/crates/d/holiday-api-rust)
[![wakatime](https://wakatime.com/badge/github/guibranco/holiday-api-rust.svg)](https://wakatime.com/badge/github/guibranco/holiday-api-rust)[![Maintainability](https://api.codeclimate.com/v1/badges/392b044637f43eb881ac/maintainability)](https://codeclimate.com/github/guibranco/holiday-api-rust/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/392b044637f43eb881ac/test_coverage)](https://codeclimate.com/github/guibranco/holiday-api-rust/test_coverage)
[![CodeFactor](https://www.codefactor.io/repository/github/guibranco/holiday-api-rust/badge)](https://www.codefactor.io/repository/github/guibranco/holiday-api-rust)| Service | Status |
| ------- | :----: |
| AppVeyor CI | [![Build status](https://ci.appveyor.com/api/projects/status/4ksqycqm761c06jb/branch/main?svg=true)](https://ci.appveyor.com/project/guibranco/holiday-api-rust/branch/main) |
| crates.io | [![Crates.io](https://img.shields.io/crates/v/holiday-api-rust.svg)](https://crates.io/crates/holiday-api-rust) |Pure Rust bindings to the [Holiday API](https://holidayapi.com).
## Dependencies and support
`holiday-api-rust` is intended to work on all tier 1 supported Rust systems:
- MacOSX
- Linux
- Windows## Minimum Compiler Version
Due to the use of certain features `holiday-api-rust` requires `rustc` version 1.18 or
higher.## Getting Started
Add the following to your `Cargo.toml`
```toml
[dependencies]
holiday_api_rust = "0.3.1"
serde_json = "1.0"
```Then in your `lib.rs` or `main.rs` file add:
```rust
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);
}
}
}
```## License
Licensed under
- MIT license ([LICENSE](https://github.com/guibranco/holiday-api-rust/blob/main/LICENSE) or [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT))