ffmpeglab-sdk 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,41 +5,25 @@ Welcome to ffmpeglab typescript sdk.
|
|
|
5
5
|
|
|
6
6
|
### Usage
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
on the typical `FFmpegLab` example used for OpenAPI.
|
|
8
|
+
This simple code allows you to render a small project
|
|
10
9
|
|
|
11
10
|
```
|
|
12
|
-
import ffmpeglab from 'ffmpeglab-sdk'
|
|
11
|
+
import * as ffmpeglab from 'ffmpeglab-sdk'
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
13
|
+
const clientConfig = new ffmpeglab.Configuration({
|
|
14
|
+
accessToken:"API_KEY",
|
|
15
|
+
basePath:"https://api.ffmpeglab.com"
|
|
16
|
+
})
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
// and after (`post`) they have been received
|
|
21
|
-
class Test implements your_api.Middleware {
|
|
22
|
-
pre(context: your_api.RequestContext): Promise<your_api.RequestContext> {
|
|
23
|
-
// Modify context here and return
|
|
24
|
-
return Promise.resolve(context);
|
|
25
|
-
}
|
|
18
|
+
const client = new ffmpeglab.RendersApi(clientConfig)
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
return Promise.resolve(context);
|
|
29
|
-
}
|
|
20
|
+
const renderDto = renderData as ffmpeglab.RenderDto
|
|
30
21
|
|
|
31
|
-
}
|
|
22
|
+
const newRender = await client.rendersControllerCreate({renderDto})
|
|
32
23
|
|
|
33
|
-
|
|
34
|
-
const configurationParameters = {
|
|
35
|
-
httpApi: new your_api.JQueryHttpLibrary(), // Can also be ignored - default is usually fine
|
|
36
|
-
baseServer: your_api.servers[0], // First server is default
|
|
37
|
-
authMethods: authConfig, // No auth is default
|
|
38
|
-
promiseMiddleware: [new Test()],
|
|
39
|
-
}
|
|
24
|
+
await client.rendersControllerRunRender({runDto:{id:newRender.id}})
|
|
40
25
|
|
|
41
|
-
|
|
42
|
-
const config = your_api.createConfiguration(configurationParameters);
|
|
26
|
+
```
|
|
43
27
|
|
|
44
28
|
|
|
45
|
-
|
|
29
|
+
see [docs](https://api.ffmpeglab.com/api) for more
|