mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
update deltachat-jsonrpc readme
This commit is contained in:
@@ -24,6 +24,21 @@ npm run build
|
|||||||
|
|
||||||
The JavaScript client is [published on NPM](https://www.npmjs.com/package/@deltachat/jsonrpc-client).
|
The JavaScript client is [published on NPM](https://www.npmjs.com/package/@deltachat/jsonrpc-client).
|
||||||
|
|
||||||
|
###### Usage
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { startDeltaChat } from "@deltachat/stdio-rpc-server";
|
||||||
|
import { C } from "@deltachat/jsonrpc-client";
|
||||||
|
|
||||||
|
const dc = await startDeltaChat("deltachat-data");
|
||||||
|
console.log(await dc.rpc.getSystemInfo());
|
||||||
|
const accounts = await dc.rpc.getAllAccounts()
|
||||||
|
console.log('accounts', accounts)
|
||||||
|
dc.close()
|
||||||
|
```
|
||||||
|
|
||||||
|
##### Generate TypeScript/JavaScript documentation
|
||||||
|
|
||||||
A script is included to build autogenerated documentation, which includes all RPC methods:
|
A script is included to build autogenerated documentation, which includes all RPC methods:
|
||||||
```sh
|
```sh
|
||||||
cd typescript
|
cd typescript
|
||||||
|
|||||||
Reference in New Issue
Block a user