OSDN Git Service

add balances api
authorYongfeng LI <wliyongfeng@gmail.com>
Mon, 14 May 2018 10:54:01 +0000 (18:54 +0800)
committerYongfeng LI <wliyongfeng@gmail.com>
Mon, 14 May 2018 10:54:01 +0000 (18:54 +0800)
src/api/balances.js [new file with mode: 0644]
src/client.js

diff --git a/src/api/balances.js b/src/api/balances.js
new file mode 100644 (file)
index 0000000..4f5bb69
--- /dev/null
@@ -0,0 +1,7 @@
+const balancesApi = (connection) => {
+  return {
+    list: () => connection.request('/list-balances', {})
+  }
+}
+
+export default balancesApi
index 74d9e55..20c2ac6 100644 (file)
@@ -3,6 +3,7 @@ import AccountsApi from 'api/account'
 import AssetApi from 'api/assets'
 import KeysApi from 'api/keys'
 import TransactionApi from 'api/transactions'
+import BalancesApi from 'api/balances'
 
 class Client {
   constructor(baseUrl, token) {
@@ -12,6 +13,7 @@ class Client {
     this.assets = new AssetApi(this.connection)
     this.keys = new KeysApi(this.connection)
     this.transactions = new TransactionApi(this.connection)
+    this.balances = new BalancesApi(this.connection)
   }
 }