change snake_case to camelCase in responses from api.submit and api.getServerInfo and add schema for it

This commit is contained in:
Ivan Tivonenko
2015-07-30 02:24:36 +03:00
parent c6f450842e
commit 03640efef5
9 changed files with 109 additions and 23 deletions

View File

@@ -162,7 +162,7 @@ describe('RippleAPI', function() {
it('submit', function(done) {
this.api.submit(responses.sign.signedTransaction,
_.partial(checkResult, responses.submit, null, done));
_.partial(checkResult, responses.submit, 'submit', done));
});
it('getBalances', function(done) {
@@ -478,7 +478,7 @@ describe('RippleAPI', function() {
it('getServerInfo', function(done) {
this.api.getServerInfo(
_.partial(checkResult, responses.getServerInfo, null, done));
_.partial(checkResult, responses.getServerInfo, 'getServerInfo', done));
});
it('getServerInfo - error', function(done) {

View File

@@ -1,22 +1,22 @@
{
"build_version": "0.24.0-rc1",
"complete_ledgers": "32570-6595042",
"buildVersion": "0.24.0-rc1",
"completeLedgers": "32570-6595042",
"hostid": "ARTS",
"last_close": {
"converge_time_s": 2.007,
"lastClose": {
"convergeTimeS": 2.007,
"proposers": 4
},
"load_factor": 1,
"loadFactor": 1,
"peers": 53,
"pubkey_node": "n94wWvFUmaKGYrKUGgpv1DyYgDeXRGdACkNQaSe7zJiy5Znio7UC",
"server_state": "full",
"validated_ledger": {
"pubkeyNode": "n94wWvFUmaKGYrKUGgpv1DyYgDeXRGdACkNQaSe7zJiy5Znio7UC",
"serverState": "full",
"validatedLedger": {
"age": 5,
"base_fee_xrp": 0.00001,
"baseFeeXrp": 0.00001,
"hash": "4482DEE5362332F54A4036ED57EE1767C9F33CF7CE5A6670355C16CECE381D46",
"reserve_base_xrp": 20,
"reserve_inc_xrp": 5,
"reserveBaseXrp": 20,
"reserveIncXrp": 5,
"seq": 6595042
},
"validation_quorum": 3
"validationQuorum": 3
}

View File

@@ -1,8 +1,8 @@
{
"success": true,
"engine_result": "tesSUCCESS",
"engine_result_code": 0,
"engine_result_message": "The transaction was applied. Only final in a validated ledger.",
"tx_blob": "12000322000000002400000017201B0086955468400000000000000C732102F89EAEC7667B30F33D0687BBA86C3FE2A08CCA40A9186C5BDE2DAA6FA97A37D87446304402207660BDEF67105CE1EBA9AD35DC7156BAB43FF1D47633199EE257D70B6B9AAFBF02207F5517BC8AEF2ADC1325897ECDBA8C673838048BCA62F4E98B252F19BE88796D770A726970706C652E636F6D81144FBFF73DA4ECF9B701940F27341FA8020C313443",
"tx_json": {}
"engineResult": "tesSUCCESS",
"engineResultCode": 0,
"engineResultMessage": "The transaction was applied. Only final in a validated ledger.",
"txBlob": "12000322000000002400000017201B0086955468400000000000000C732102F89EAEC7667B30F33D0687BBA86C3FE2A08CCA40A9186C5BDE2DAA6FA97A37D87446304402207660BDEF67105CE1EBA9AD35DC7156BAB43FF1D47633199EE257D70B6B9AAFBF02207F5517BC8AEF2ADC1325897ECDBA8C673838048BCA62F4E98B252F19BE88796D770A726970706C652E636F6D81144FBFF73DA4ECF9B701940F27341FA8020C313443",
"txJson": {}
}