[CI Skip] 0.31.17

This commit is contained in:
Travis CI
2018-10-12 09:24:33 +00:00
parent 8fafedcf00
commit dc5802abe4
175 changed files with 3920 additions and 2498 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ API Selection
There are two flavours of the API provided, one allowing a standard interface via JavaScript Promises and the second provides an Observable wrapper using [RxJS](https://github.com/ReactiveX/rxjs). Depending on your use-case and familiarity, you can choose either (or even both) for your application.
* [ApiPromise](classes/_promise_index_.apipromise.md) All interface calls returns Promises, including the static `.create(...)`. Additionally any subscription method use standard JavaScript `(error, value) => {}` callbacks.
* [ApiPromise](classes/_promise_index_.apipromise.md) All interface calls returns Promises, including the static `.create(...)`. Additionally any subscription method use `(value) => {}` callbacks, returning the value as the subscription is updated.
* [ApiRx](classes/_rx_index_.apirx.md) All interface calls return RxJS Observables, including the static `.create(...)`. In the same fashion and subscription-based methods return long-running Observables that update with the latest values.
Dynamic by default
@@ -45,7 +45,7 @@ import { ApiPromise } from '@polkadot/api';
const api = await ApiPromise.create();
// make a call to retrieve the current network head
api.rpc.chain.newHead((error, header) => {
api.rpc.chain.newHead((header) => {
console.log(`Chain is at #${header.blockNumber}`);
});
```