Begin work on YNAB client
After reading these docs https://api.youneedabudget.com/v1#/Transactions/createTransaction I successfully made a request to post a transaction to my YNAB account. Hastily created a client.go that doesn't contain much at the moment.
This commit is contained in:
parent
2e719d1174
commit
e223adfec5
4 changed files with 71 additions and 2 deletions
24
monzo_ynab/ynab/client.go
Normal file
24
monzo_ynab/ynab/client.go
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
package client
|
||||
|
||||
import (
|
||||
"serde"
|
||||
)
|
||||
|
||||
// See requests.txt for more details.
|
||||
func PostTransactions(accountID string, txs []serde.Transaction{}) error {
|
||||
return map[string]string{
|
||||
"transactions": [
|
||||
{
|
||||
"account_id": accountID,
|
||||
"date": "2019-12-30",
|
||||
"amount": 10000,
|
||||
"payee_name": "Richard Stallman",
|
||||
"memo": "Not so free software after all...",
|
||||
"cleared": "cleared",
|
||||
"approved": true,
|
||||
"flag_color": "red",
|
||||
"import_id": "xyz-123"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue