Skip to content

Commit

Permalink
Merge pull request #31 from apivideo/add-upload-progress-listener-in-…
Browse files Browse the repository at this point in the history
…nodejs

feat(nodejs) add upload progress listener
  • Loading branch information
bot-api-video authored Sep 28, 2021
2 parents 264b870 + b5f2803 commit e733dcb
Show file tree
Hide file tree
Showing 6 changed files with 210 additions and 137 deletions.
4 changes: 2 additions & 2 deletions doc/api/VideosApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**token** | **string**| The unique identifier for the token you want to use to upload a video. | [default to undefined]
**file** | **string**| The path to the video you want to upload. | [default to undefined]

**progressListener?** | **(event: UploadProgressEvent) => void \| undefined** | Optional upload progress listener | [default to undefined]

### Upload chunks

Expand Down Expand Up @@ -427,7 +427,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**videoId** | **string**| Enter the videoId you want to use to upload your video. | [default to undefined]
**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]

**progressListener?** | **(event: UploadProgressEvent) => void \| undefined** | Optional upload progress listener | [default to undefined]

### Upload chunks

Expand Down
123 changes: 62 additions & 61 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@api.video/nodejs-client",
"version": "2.0.9",
"version": "2.0.10",
"description": "api.video nodejs client",
"author": "api.video ecosystem team",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src/HttpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class HttpClient {
this.chunkSize = params.chunkSize;
this.tokenType = 'Bearer';
this.headers = {
'User-Agent': `api.video client (nodejs; v:2.0.9; )`,
'User-Agent': `api.video client (nodejs; v:2.0.10; )`,
Accept: 'application/json, */*;q=0.8',
};
this.baseRequest = got.extend({
Expand Down
Loading

0 comments on commit e733dcb

Please sign in to comment.