ffmpeglab-sdk 0.3.7 → 0.3.11
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/.openapi-generator/FILES +0 -1
- package/.openapi-generator-ignore +1 -0
- package/README.md +33 -35
- package/package.json +5 -5
package/.openapi-generator/FILES
CHANGED
package/README.md
CHANGED
|
@@ -5,41 +5,39 @@ Welcome to ffmpeglab typescript sdk.
|
|
|
5
5
|
|
|
6
6
|
### Usage
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
This simple code allows you to render a small project
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import * as ffmpeglab from 'ffmpeglab-sdk';
|
|
12
|
+
|
|
13
|
+
const clientConfig = new ffmpeglab.Configuration({
|
|
14
|
+
accessToken: 'API_KEY',
|
|
15
|
+
basePath: 'https://api.ffmpeglab.com',
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const client = new ffmpeglab.RendersApi(clientConfig);
|
|
19
|
+
|
|
20
|
+
const render = await client.rendersControllerCreate({
|
|
21
|
+
project: 'myproject',
|
|
22
|
+
editor: {
|
|
23
|
+
code: '-i $MEDIA_1 -movflags +faststart myproject.mp4',
|
|
24
|
+
selectedCode: 'custom',
|
|
25
|
+
},
|
|
26
|
+
layers: [
|
|
27
|
+
{
|
|
28
|
+
id: 'layer1',
|
|
29
|
+
media: [
|
|
30
|
+
{
|
|
31
|
+
id: 'media1',
|
|
32
|
+
url: 'https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
await client.rendersControllerRunRender({runDto:{id:render.id}})
|
|
11
40
|
```
|
|
12
|
-
import ffmpeglab from 'ffmpeglab-sdk'
|
|
13
|
-
|
|
14
|
-
// Covers all auth methods included in your OpenAPI yaml definition
|
|
15
|
-
const authConfig: your_api.AuthMethodsConfiguration = {
|
|
16
|
-
"api_key": "YOUR_API_KEY"
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Implements a simple middleware to modify requests before (`pre`) they are sent
|
|
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
|
-
}
|
|
26
|
-
|
|
27
|
-
post(context: your_api.ResponseContext): Promise<your_api.ResponseContext> {
|
|
28
|
-
return Promise.resolve(context);
|
|
29
|
-
}
|
|
30
41
|
|
|
31
|
-
}
|
|
32
42
|
|
|
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
|
-
}
|
|
40
|
-
|
|
41
|
-
// Convert to actual configuration
|
|
42
|
-
const config = your_api.createConfiguration(configurationParameters);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
```
|
|
43
|
+
see [docs](https://api.ffmpeglab.com/api) for more
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ffmpeglab-sdk",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"author": "OpenAPI-Generator",
|
|
3
|
+
"description": "typescript client for ffmpeglab",
|
|
4
|
+
"author": "danilaplee",
|
|
6
5
|
"repository": {
|
|
7
6
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/
|
|
7
|
+
"url": "https://github.com/ffmpeglab/server.git"
|
|
9
8
|
},
|
|
10
9
|
"main": "./dist/index.js",
|
|
11
10
|
"types": "./dist/index.d.ts",
|
|
@@ -17,5 +16,6 @@
|
|
|
17
16
|
},
|
|
18
17
|
"devDependencies": {
|
|
19
18
|
"typescript": "^4.0 || ^5.0"
|
|
20
|
-
}
|
|
19
|
+
},
|
|
20
|
+
"version": "0.3.11"
|
|
21
21
|
}
|