To manager all credit that should very nice
-
install dependencies
go get github.com/bitly/go-simplejson \ github.com/mattn/go-sqlite3
git clone https://github.com/vinkdong/asset-alarm.git cd asset-alarm npm install
-
start server
go build ./asset-alarm -db=./t.db start
api | method | body | use |
---|---|---|---|
/api/list | GET/POST | {} | Get all credits |
/api/item/add | POST |
{
"version":"v0.1",
"credit" : {
"name":"Vink Bank",
"icon":"../icon/vink.logo",
"credit":10.000000,
"debit":50.000000,
"balance":10.000000,
"account_date":8,
"repayment_date":0
}
}
|
Add an item to credit |
/api/record/add | POST |
{
"version":"v0.1",
"record" : {
"cid":1,
"type":"out",
"credit":10.000000,
"debit":50.000000,
"amount":10.000000,
"time":"2017-01-23 20:01:09"
}
}
|
Add an item to record |