orionx-sdk
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -39,2 +39,6 @@ 'use strict'; | ||
var _graphqlTag = require('graphql-tag'); | ||
var _graphqlTag2 = _interopRequireDefault(_graphqlTag); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -41,0 +45,0 @@ |
@@ -23,2 +23,6 @@ 'use strict'; | ||
var _transactions = require('./transactions'); | ||
var _transactions2 = _interopRequireDefault(_transactions); | ||
var _wallet = require('./wallet'); | ||
@@ -39,4 +43,5 @@ | ||
me: _me2.default, | ||
transactions: _transactions2.default, | ||
wallet: _wallet2.default, | ||
wallets: _wallets2.default | ||
}; |
{ | ||
"name": "orionx-sdk", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Help developers with Orionx integrations", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -48,3 +48,3 @@ <p align="center"> | ||
// And then use this in any Component.js | ||
Orionx.market({ code: 'LTCBTC' }) | ||
Orionx.market({code: 'LTCBTC'}) | ||
.then(function(market) { | ||
@@ -65,3 +65,3 @@ console.log(market) | ||
```js | ||
await Orionx.cancelOrder({ orderId: 'asd73jksslksdf' }) | ||
await Orionx.cancelOrder({orderId: 'asd73jksslksdf'}) | ||
``` | ||
@@ -118,3 +118,3 @@ | ||
```js | ||
await Orionx.market({ code: ':marketCode' }) | ||
await Orionx.market({code: ':marketCode'}) | ||
``` | ||
@@ -178,2 +178,18 @@ | ||
### transactions | ||
The `transactions()` shows all transactions from the given wallet. It's results are paginated. | ||
```js | ||
await Orionx.transactions({walletId: ':walletId', page: :page, limit: :limit }) | ||
``` | ||
#### Params | ||
**walletId:** The ID of the wallet you want to display the transactions | ||
**page:** The page of results you want to display. | ||
**limit:** The number of items per page. | ||
### Wallet | ||
@@ -184,3 +200,3 @@ | ||
```js | ||
await Orionx.wallet({ currencyCode: ':currencyCode' }) | ||
await Orionx.wallet({currencyCode: ':currencyCode'}) | ||
``` | ||
@@ -187,0 +203,0 @@ |
@@ -6,2 +6,3 @@ import callOrionx from './helpers/callOrionx' | ||
import mutations from './mutations' | ||
import gql from 'graphql-tag' | ||
@@ -14,8 +15,8 @@ const Orionx = { | ||
checkCredentials, | ||
async graphql({ query, variables }) { | ||
async graphql({query, variables}) { | ||
this.checkCredentials() | ||
if (!query) throw new Error('Missing Query') | ||
if (!variables) throw new Error('Missing Variables') | ||
const body = JSON.stringify({ query, variables }) | ||
return await callOrionx({ body, credentials: this.credentials }) | ||
const body = JSON.stringify({query, variables}) | ||
return await callOrionx({body, credentials: this.credentials}) | ||
}, | ||
@@ -22,0 +23,0 @@ ...queries, |
@@ -5,2 +5,3 @@ import market from './market' | ||
import me from './me' | ||
import transactions from './transactions' | ||
import wallet from './wallet' | ||
@@ -14,4 +15,5 @@ import wallets from './wallets' | ||
me, | ||
transactions, | ||
wallet, | ||
wallets | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
792810
82
1631
226