Skip to content

Degerada/holiday-api-rust

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HolidayAPI Rust client

The HolidayAPI client wrapper written in Rust.

GitHub last commit (branch) Crates.io

Service Status
AppveyorCI Build status
crates.io Crates.io

Pure Rust bindings to the Holiday API.

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

[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);
        }
    }
}

License

Licensed under

About

The Holiday API client wrapper written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%