Skip to content

Commit e733dcb

Browse files
Merge pull request #31 from apivideo/add-upload-progress-listener-in-nodejs
feat(nodejs) add upload progress listener
2 parents 264b870 + b5f2803 commit e733dcb

File tree

6 files changed

+210
-137
lines changed

6 files changed

+210
-137
lines changed

doc/api/VideosApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ Name | Type | Description | Notes
322322
------------- | ------------- | ------------- | -------------
323323
**token** | **string**| The unique identifier for the token you want to use to upload a video. | [default to undefined]
324324
**file** | **string**| The path to the video you want to upload. | [default to undefined]
325-
325+
**progressListener?** | **(event: UploadProgressEvent) => void \| undefined** | Optional upload progress listener | [default to undefined]
326326

327327
### Upload chunks
328328

@@ -427,7 +427,7 @@ Name | Type | Description | Notes
427427
------------- | ------------- | ------------- | -------------
428428
**videoId** | **string**| Enter the videoId you want to use to upload your video. | [default to undefined]
429429
**file** | **string**| The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the \\\"/videos\\\" endpoint and add the \\\"source\\\" parameter when you create a new video. | [default to undefined]
430-
430+
**progressListener?** | **(event: UploadProgressEvent) => void \| undefined** | Optional upload progress listener | [default to undefined]
431431

432432
### Upload chunks
433433

package-lock.json

Lines changed: 62 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@api.video/nodejs-client",
3-
"version": "2.0.9",
3+
"version": "2.0.10",
44
"description": "api.video nodejs client",
55
"author": "api.video ecosystem team",
66
"engines": {

src/HttpClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class HttpClient {
3737
this.chunkSize = params.chunkSize;
3838
this.tokenType = 'Bearer';
3939
this.headers = {
40-
'User-Agent': `api.video client (nodejs; v:2.0.9; )`,
40+
'User-Agent': `api.video client (nodejs; v:2.0.10; )`,
4141
Accept: 'application/json, */*;q=0.8',
4242
};
4343
this.baseRequest = got.extend({

0 commit comments

Comments
 (0)