Skip to content

Official Ruby library for Holiday API

License

Notifications You must be signed in to change notification settings

holidayapi/holidayapi-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruby-holidayapi

Official Ruby library for Holiday API

Installation

gem install ruby-holidayapi

Usage

require 'ruby-holidayapi'

hapi = HolidayAPI::V1.new('_YOUR_API_KEY_')

parameters = {
  # Required
  'country' => 'US',
  'year'    => 2016,
  # Optional
  # 'month'    => 7,
  # 'day'      => 4,
  # 'previous' => true,
  # 'upcoming' => true,
  # 'public'   => true,
  # 'pretty'   => true,
}

response = hapi.holidays(parameters)