ユーザ用ツール

サイト用ツール


software:national-holiday-api

文書の過去の版を表示しています。


national-holiday-api

国民の祝日の管理機能と Web API を提供します。

機能要件

  • rails_admin が要求するパッケージ
  • PostgreSQL (依存はしていないのでrails流に他のDBへ変更できます)
    • sudo apt-get install libpq-dev

インストール

  • からソース取得

git clone git:github.com/shinoburc/national-holiday-api.git * gemのインストール * cd national-holiday-api * bundle install * DBセットアップ * rake db:setup * rails 起動 * rails s * ブラウザでアクセス * http://localhost:3000 default username and password is admin@local.host/caladmin. and default seed.rb data is Japanese national holidays. APIs api/holidays/list/DATE1/DATE2 : Get holidays list between DATE1 and DATE2 e.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. APIs demo dandydot.dyndns.org:3001/api/holidays/list/2013-01-01/2013-12-31 dandydot.dyndns.org:3001/api/holidays/is_holiday/2013-01-01

software/national-holiday-api.1370876068.txt.gz · 最終更新: 2015/06/17 05:11 (外部編集)