Skip to content
Snippets Groups Projects
Commit 354cb17e authored by Mahdi Yari's avatar Mahdi Yari
Browse files

add .call()

parent 82ff0406
No related branches found
No related tags found
1 merge request!17update readme
...@@ -73,6 +73,21 @@ hive.api.setOptions({ url: 'https://api.hive.blog' }); ...@@ -73,6 +73,21 @@ hive.api.setOptions({ url: 'https://api.hive.blog' });
# API # API
## API CALL
Can be used for all the possible API calls.
```js
hive.api.call(method, params, callback);
// or
hive.api.callAsync(method, params).then(res => {});
```
Example:
```js
hive.api.callAsync('condenser_api.get_accounts', [['mahdiyari']])
.then((res) => console.log(res))
````
## Subscriptions ## Subscriptions
### Set Subscribe Callback ### Set Subscribe Callback
...@@ -575,6 +590,7 @@ Return Example: ...@@ -575,6 +590,7 @@ Return Example:
``` ```
### Get State With Options ### Get State With Options
**Warning:** getState calls are getting deprecated.
```js ```js
hive.api.getStateWith(options, callback); hive.api.getStateWith(options, callback);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment