]> git.ktnx.net Git - mobile-ledger.git/commit
support both 1.14 and 1.15 JSON APIs
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 21 Dec 2019 21:22:14 +0000 (23:22 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 21 Dec 2019 21:23:50 +0000 (23:23 +0200)
commit54002a662d97289a739d3cdb9888bbab58a8064f
tree4cc5096b8a8f24c43db5148f931ba07cde5c0cb1
parent017aa3e990667845af1513ede2db282c4c03b991
support both 1.14 and 1.15 JSON APIs

this is a major and somewhat messy rework

the idea is that several APIs should be able to co-exist

conversion between MoLe's internal structures and the JSON API is moved
to the version-dependent JSON representations

an 'auto' setting for the version (the default) attempts all available
API versions starting from the latest

HTTP status 400 is interpreted as "version mismatch" (same as 405)
41 files changed:
app/src/main/java/net/ktnx/mobileledger/async/RetrieveTransactionsTask.java
app/src/main/java/net/ktnx/mobileledger/async/SendTransactionTask.java
app/src/main/java/net/ktnx/mobileledger/json/AccountListParser.java [deleted file]
app/src/main/java/net/ktnx/mobileledger/json/ParsedAmount.java [deleted file]
app/src/main/java/net/ktnx/mobileledger/json/ParsedBalance.java [deleted file]
app/src/main/java/net/ktnx/mobileledger/json/ParsedLedgerAccount.java [deleted file]
app/src/main/java/net/ktnx/mobileledger/json/ParsedLedgerTransaction.java
app/src/main/java/net/ktnx/mobileledger/json/ParsedPosting.java [deleted file]
app/src/main/java/net/ktnx/mobileledger/json/ParsedPrice.java [deleted file]
app/src/main/java/net/ktnx/mobileledger/json/ParsedQuantity.java [deleted file]
app/src/main/java/net/ktnx/mobileledger/json/ParsedSourcePos.java [deleted file]
app/src/main/java/net/ktnx/mobileledger/json/ParsedStyle.java [deleted file]
app/src/main/java/net/ktnx/mobileledger/json/TransactionListParser.java [deleted file]
app/src/main/java/net/ktnx/mobileledger/json/v1_14/AccountListParser.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_14/ParsedAmount.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_14/ParsedBalance.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_14/ParsedLedgerAccount.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_14/ParsedLedgerTransaction.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_14/ParsedPosting.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_14/ParsedPrice.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_14/ParsedQuantity.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_14/ParsedSourcePos.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_14/ParsedStyle.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_14/TransactionListParser.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_15/AccountListParser.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_15/ParsedAmount.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_15/ParsedBalance.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_15/ParsedLedgerAccount.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_15/ParsedLedgerTransaction.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_15/ParsedPosting.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_15/ParsedPrice.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_15/ParsedQuantity.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_15/ParsedSourcePos.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_15/ParsedStyle.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/json/v1_15/TransactionListParser.java [new file with mode: 0644]
app/src/main/java/net/ktnx/mobileledger/model/LedgerTransaction.java
app/src/main/java/net/ktnx/mobileledger/model/LedgerTransactionAccount.java
app/src/main/java/net/ktnx/mobileledger/model/MobileLedgerProfile.java
app/src/main/res/values-bg/strings.xml
app/src/main/res/values/strings.xml
app/src/test/java/net/ktnx/mobileledger/json/ParsedQuantityTest.java