Rename getPathFind to getPaths

This commit is contained in:
Chris Clark
2015-07-09 15:12:45 -07:00
parent 935a463d3b
commit 046d397dfb
4 changed files with 8 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ const getTransaction = require('./ledger/transaction');
const getTransactions = require('./ledger/transactions');
const getTrustlines = require('./ledger/trustlines');
const getBalances = require('./ledger/balances');
const getPathFind = require('./ledger/pathfind');
const getPaths = require('./ledger/pathfind');
const getOrders = require('./ledger/orders');
const getOrderbook = require('./ledger/orderbook');
const getSettings = require('./ledger/settings');
@@ -41,7 +41,7 @@ RippleAPI.prototype = {
getTransactions,
getTrustlines,
getBalances,
getPathFind,
getPaths,
getOrders,
getOrderbook,
getSettings,

View File

@@ -92,7 +92,7 @@ function formatResponse(pathfind, paths) {
}
}
function getPathFind(pathfind, callback) {
function getPaths(pathfind, callback) {
validate.pathfind(pathfind);
const address = pathfind.source.address;
@@ -102,4 +102,4 @@ function getPathFind(pathfind, callback) {
], composeAsync(_.partial(formatResponse, pathfind), callback));
}
module.exports = utils.wrapCatch(getPathFind);
module.exports = utils.wrapCatch(getPaths);

View File

@@ -30,7 +30,7 @@ const getSettingsResponse = require('./fixtures/get-settings-response');
const getOrdersResponse = require('./fixtures/get-orders-response');
const getOrderbookResponse = require('./fixtures/get-orderbook-response');
const getServerInfoResponse = require('./fixtures/get-server-info-response');
const getPathFindResponse = require('./fixtures/get-pathfind-response');
const getPathsResponse = require('./fixtures/get-paths-response');
const address = addresses.ACCOUNT;
function checkResult(expected, done, error, response) {
@@ -173,7 +173,7 @@ describe('RippleAPI', function() {
});
});
it('getPathFind', function(done) {
it('getPaths', function(done) {
const pathfind = {
source: {
address: address
@@ -187,8 +187,8 @@ describe('RippleAPI', function() {
}
}
};
this.api.getPathFind(pathfind,
_.partial(checkResult, getPathFindResponse, done));
this.api.getPaths(pathfind,
_.partial(checkResult, getPathsResponse, done));
});
it('getLedgerVersion', function() {