Manage national holidays and provide web APIs.
national-holiday-api Japanse official site is here.
-
depend on rails_admin packages
-
PostgreSQL (change yourself easier)
sudo apt-get install libpq-dev
-
checkout
git clone git://github.com/shinoburc/national-holiday-api.git
-
install gems
cd national-holiday-api; bundle install
-
DB Setup
rake db:setup
-
Run rails server
rails s
-
Go to localhost:3000
default username and password is [email protected]/caladmin. and default seed.rb data is Japanese national holidays.
-
checkout
git clone git://github.com/shinoburc/national-holiday-api.git
-
cd national-holiday-api; heroku create YOUR_APP_NAME
-
git push heroku master
-
heroku run rake db:setup
-
Go to YOUR_APP_NAME.heroku.com
default username and password is [email protected]/caladmin.
First of all, You have to change admin password in Administration.
-
api/holidays/list/DATE1/DATE2
: Get holidays list between DATE1 and DATE2e.g.) localhost:3000/api/holidays/list/2013-01-01/2013-12-31
(permanent API url is localhost:3000/api/v1/holidays/list/)
return value is holidays list in 2013 as JSON.
You can get list as XML following.
e.g.) localhost:3000/api/holidays/list/2013-01-01/2013-12-31.xml
And! you can get list as .cal.dat format following. Yes!!
e.g.) localhost:3000/api/holidays/list/2013-01-01/2013-12-31.caldat
-
api/holidays/is_holiday/DATE1
: Check DATE1 is holiday?e.g.) localhost:3000/api/holidays/is_holiday/2013-01-01
(permanent API url is localhost:3000/api/v1/holidays/is_holiday/)
return true or false.
-
national-holiday-api.heroku.com/api/holidays/list/2013-01-01/2013-12-31
-
national-holiday-api.heroku.com/api/holidays/is_holiday/2013-01-01
GNU GPLv3.