api budget

This commit is contained in:
Gwenhael Le Moine 2014-11-06 17:15:25 +01:00
parent 65514534b7
commit b6b1f30ccf

6
app.rb
View file

@ -59,6 +59,12 @@ class LedgerRbApp < Sinatra::Base
Ledger.cleared.to_json
end
get '/api/ledger/budget/?' do
param :period, String, default: 'this month'
Ledger.budget( params[ :period ] ).to_json
end
get '/api/ledger/version/?' do
Ledger.version
end