Skip to content

Commit cac632a

Browse files
authored
chore: Updated docs (tauri-apps#214)
1 parent 21def59 commit cac632a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1481
-729
lines changed

docs/en/api/js/classes/http.body.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,32 @@ hide_title: true
99

1010
[http](../modules/http.md).Body
1111

12-
## Constructors
13-
14-
### constructor
15-
16-
\+ **new Body**(`type`: *string*, `payload`: *unknown*): [*Body*](http.body.md)
17-
18-
#### Parameters:
19-
20-
Name | Type |
21-
:------ | :------ |
22-
`type` | *string* |
23-
`payload` | *unknown* |
24-
25-
**Returns:** [*Body*](http.body.md)
26-
27-
Defined in: [http.ts:22](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L22)
12+
The body object to be used on POST and PUT requests.
2813

2914
## Properties
3015

3116
### payload
3217

3318
**payload**: *unknown*
3419

35-
Defined in: [http.ts:22](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L22)
20+
Defined in: [http.ts:28](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L28)
3621

3722
___
3823

3924
### type
4025

4126
**type**: *string*
4227

43-
Defined in: [http.ts:21](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L21)
28+
Defined in: [http.ts:27](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L27)
4429

4530
## Methods
4631

4732
### bytes
4833

4934
`Static`**bytes**(`bytes`: *number*[]): [*Body*](http.body.md)
5035

36+
Creates a new byte array body.
37+
5138
#### Parameters:
5239

5340
Name | Type |
@@ -56,46 +43,58 @@ Name | Type |
5643

5744
**Returns:** [*Body*](http.body.md)
5845

59-
Defined in: [http.ts:41](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L41)
46+
The body object ready to be used on the POST and PUT requests.
47+
48+
Defined in: [http.ts:76](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L76)
6049

6150
___
6251

6352
### form
6453

6554
`Static`**form**(`data`: *Record*<string, [*Part*](../modules/http.md#part)\>): [*Body*](http.body.md)
6655

56+
Creates a new form data body.
57+
6758
#### Parameters:
6859

69-
Name | Type |
70-
:------ | :------ |
71-
`data` | *Record*<string, [*Part*](../modules/http.md#part)\> |
60+
Name | Type | Description |
61+
:------ | :------ | :------ |
62+
`data` | *Record*<string, [*Part*](../modules/http.md#part)\> | The body data. |
7263

7364
**Returns:** [*Body*](http.body.md)
7465

75-
Defined in: [http.ts:29](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L29)
66+
The body object ready to be used on the POST and PUT requests.
67+
68+
Defined in: [http.ts:43](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L43)
7669

7770
___
7871

7972
### json
8073

8174
`Static`**json**(`data`: *Record*<any, any\>): [*Body*](http.body.md)
8275

76+
Creates a new JSON body.
77+
8378
#### Parameters:
8479

85-
Name | Type |
86-
:------ | :------ |
87-
`data` | *Record*<any, any\> |
80+
Name | Type | Description |
81+
:------ | :------ | :------ |
82+
`data` | *Record*<any, any\> | The body JSON object. |
8883

8984
**Returns:** [*Body*](http.body.md)
9085

91-
Defined in: [http.ts:33](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L33)
86+
The body object ready to be used on the POST and PUT requests.
87+
88+
Defined in: [http.ts:54](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L54)
9289

9390
___
9491

9592
### text
9693

9794
`Static`**text**(`value`: *string*): [*Body*](http.body.md)
9895

96+
Creates a new UTF-8 string body.
97+
9998
#### Parameters:
10099

101100
Name | Type |
@@ -104,4 +103,6 @@ Name | Type |
104103

105104
**Returns:** [*Body*](http.body.md)
106105

107-
Defined in: [http.ts:37](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L37)
106+
The body object ready to be used on the POST and PUT requests.
107+
108+
Defined in: [http.ts:65](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L65)

docs/en/api/js/classes/http.client.md

Lines changed: 22 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,13 @@ hide_title: true
99

1010
[http](../modules/http.md).Client
1111

12-
## Constructors
13-
14-
### constructor
15-
16-
\+ **new Client**(`id`: *number*): [*Client*](http.client.md)
17-
18-
#### Parameters:
19-
20-
Name | Type |
21-
:------ | :------ |
22-
`id` | *number* |
23-
24-
**Returns:** [*Client*](http.client.md)
25-
26-
Defined in: [http.ts:78](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L78)
27-
2812
## Properties
2913

3014
### id
3115

3216
**id**: *number*
3317

34-
Defined in: [http.ts:78](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L78)
18+
Defined in: [http.ts:122](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L122)
3519

3620
## Methods
3721

@@ -51,14 +35,14 @@ Name |
5135

5236
Name | Type | Description |
5337
:------ | :------ | :------ |
54-
`url` | *string* | Request URL |
55-
`options?` | [*RequestOptions*](../modules/http.md#requestoptions) | Request options |
38+
`url` | *string* | The request URL. |
39+
`options?` | [*RequestOptions*](../modules/http.md#requestoptions) | The request options. |
5640

5741
**Returns:** *Promise*<[*Response*](../interfaces/http.response.md)<T\>\>
5842

5943
A promise resolving to the response.
6044

61-
Defined in: [http.ts:194](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L194)
45+
Defined in: [http.ts:239](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L239)
6246

6347
___
6448

@@ -70,7 +54,7 @@ Drops the client instance.
7054

7155
**Returns:** *Promise*<void\>
7256

73-
Defined in: [http.ts:88](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L88)
57+
Defined in: [http.ts:133](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L133)
7458

7559
___
7660

@@ -90,14 +74,14 @@ Name |
9074

9175
Name | Type | Description |
9276
:------ | :------ | :------ |
93-
`url` | *string* | Request URL |
94-
`options?` | [*RequestOptions*](../modules/http.md#requestoptions) | - |
77+
`url` | *string* | The request URL. |
78+
`options?` | [*RequestOptions*](../modules/http.md#requestoptions) | The request options. |
9579

9680
**Returns:** *Promise*<[*Response*](../interfaces/http.response.md)<T\>\>
9781

9882
A promise resolving to the response.
9983

100-
Defined in: [http.ts:122](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L122)
84+
Defined in: [http.ts:167](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L167)
10185

10286
___
10387

@@ -117,14 +101,14 @@ Name |
117101

118102
Name | Type | Description |
119103
:------ | :------ | :------ |
120-
`url` | *string* | Request URL |
121-
`options?` | [*RequestOptions*](../modules/http.md#requestoptions) | Request options |
104+
`url` | *string* | The request URL. |
105+
`options?` | [*RequestOptions*](../modules/http.md#requestoptions) | The request options. |
122106

123107
**Returns:** *Promise*<[*Response*](../interfaces/http.response.md)<T\>\>
124108

125109
A promise resolving to the response.
126110

127-
Defined in: [http.ts:179](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L179)
111+
Defined in: [http.ts:224](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L224)
128112

129113
___
130114

@@ -144,15 +128,15 @@ Name |
144128

145129
Name | Type | Description |
146130
:------ | :------ | :------ |
147-
`url` | *string* | Request URL |
148-
`body?` | [*Body*](http.body.md) | - |
149-
`options?` | [*RequestOptions*](../modules/http.md#requestoptions) | - |
131+
`url` | *string* | The request URL. |
132+
`body?` | [*Body*](http.body.md) | The body of the request. |
133+
`options?` | [*RequestOptions*](../modules/http.md#requestoptions) | The request options. |
150134

151135
**Returns:** *Promise*<[*Response*](../interfaces/http.response.md)<T\>\>
152136

153137
A promise resolving to the response.
154138

155-
Defined in: [http.ts:138](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L138)
139+
Defined in: [http.ts:183](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L183)
156140

157141
___
158142

@@ -172,23 +156,23 @@ Name |
172156

173157
Name | Type | Description |
174158
:------ | :------ | :------ |
175-
`url` | *string* | Request URL |
176-
`body?` | [*Body*](http.body.md) | - |
177-
`options?` | [*RequestOptions*](../modules/http.md#requestoptions) | - |
159+
`url` | *string* | The request URL. |
160+
`body?` | [*Body*](http.body.md) | The body of the request. |
161+
`options?` | [*RequestOptions*](../modules/http.md#requestoptions) | Request options. |
178162

179163
**Returns:** *Promise*<[*Response*](../interfaces/http.response.md)<T\>\>
180164

181165
A promise resolving to the response.
182166

183-
Defined in: [http.ts:159](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L159)
167+
Defined in: [http.ts:204](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L204)
184168

185169
___
186170

187171
### request
188172

189173
**request**<T\>(`options`: [*HttpOptions*](../interfaces/http.httpoptions.md)): *Promise*<[*Response*](../interfaces/http.response.md)<T\>\>
190174

191-
Makes a HTTP request.
175+
Makes an HTTP request.
192176

193177
#### Type parameters:
194178

@@ -200,10 +184,10 @@ Name |
200184

201185
Name | Type | Description |
202186
:------ | :------ | :------ |
203-
`options` | [*HttpOptions*](../interfaces/http.httpoptions.md) | Request options |
187+
`options` | [*HttpOptions*](../interfaces/http.httpoptions.md) | The request options. |
204188

205189
**Returns:** *Promise*<[*Response*](../interfaces/http.response.md)<T\>\>
206190

207191
A promise resolving to the response.
208192

209-
Defined in: [http.ts:104](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/http.ts#L104)
193+
Defined in: [http.ts:149](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/http.ts#L149)

docs/en/api/js/classes/shell.child.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,38 +23,56 @@ Name | Type |
2323

2424
**Returns:** [*Child*](shell.child.md)
2525

26-
Defined in: [shell.ts:79](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/shell.ts#L79)
26+
Defined in: [shell.ts:115](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/shell.ts#L115)
2727

2828
## Properties
2929

3030
### pid
3131

3232
**pid**: *number*
3333

34-
Defined in: [shell.ts:79](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/shell.ts#L79)
34+
The child process `pid`.
35+
36+
Defined in: [shell.ts:115](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/shell.ts#L115)
3537

3638
## Methods
3739

3840
### kill
3941

4042
**kill**(): *Promise*<void\>
4143

44+
Kills the child process.
45+
4246
**Returns:** *Promise*<void\>
4347

44-
Defined in: [shell.ts:96](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/shell.ts#L96)
48+
A promise indicating the success or failure of the operation.
49+
50+
Defined in: [shell.ts:151](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/shell.ts#L151)
4551

4652
___
4753

4854
### write
4955

5056
**write**(`data`: *string* \| *number*[]): *Promise*<void\>
5157

58+
Writes `data` to the `stdin`.
59+
60+
**`example`**
61+
```typescript
62+
const command = new Command('node')
63+
const child = await command.spawn()
64+
await child.write('message')
65+
await child.write([0, 1, 2, 3, 4, 5])
66+
```
67+
5268
#### Parameters:
5369

54-
Name | Type |
55-
:------ | :------ |
56-
`data` | *string* \| *number*[] |
70+
Name | Type | Description |
71+
:------ | :------ | :------ |
72+
`data` | *string* \| *number*[] | The message to write, either a string or a byte array. |
5773

5874
**Returns:** *Promise*<void\>
5975

60-
Defined in: [shell.ts:85](https://github.com/tauri-apps/tauri/blob/850a99a5/tooling/api/src/shell.ts#L85)
76+
A promise indicating the success or failure of the operation.
77+
78+
Defined in: [shell.ts:135](https://github.com/tauri-apps/tauri/blob/a68b4ee8/tooling/api/src/shell.ts#L135)

0 commit comments

Comments
 (0)