Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 47 additions & 47 deletions README.md

Large diffs are not rendered by default.

164 changes: 82 additions & 82 deletions docs/api/VideoApi.md → docs/api/MediaApi.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# VideoApi
# MediaApi

All URIs are relative to *http://localhost/api*

| Method | Description | HTTP request |
| ------------- | ------------- | ------------- |
| [**create()**](VideoApi.md#create) | Create video object | **POST** /videos/create |
| [**update()**](VideoApi.md#update) | update video info | **PATCH** /videos/{id} |
| [**delete()**](VideoApi.md#delete) | Delete video | **DELETE** /videos/{id} |
| [**uploadThumbnail()**](VideoApi.md#uploadThumbnail) | Upload video thumbnail | **POST** /videos/{id}/thumbnail |
| [**deleteThumbnail()**](VideoApi.md#deleteThumbnail) | Delete video thumbnail | **DELETE** /videos/{id}/thumbnail |
| [**createCaption()**](VideoApi.md#createCaption) | Create a new video caption | **POST** /videos/{id}/captions/{lan} |
| [**deleteCaption()**](VideoApi.md#deleteCaption) | Delete a video caption | **DELETE** /videos/{id}/captions/{lan} |
| [**getCaptions()**](VideoApi.md#getCaptions) | Get video captions | **GET** /videos/{id}/captions |
| [**getCost()**](VideoApi.md#getCost) | get video transcoding cost | **GET** /videos/cost |
| [**getDetail()**](VideoApi.md#getDetail) | get video detail | **GET** /videos/{id} |
| [**getVideoList()**](VideoApi.md#getVideoList) | Get user videos list | **POST** /videos |
| [**getVideoPlayerInfo()**](VideoApi.md#getVideoPlayerInfo) | Get video object | **GET** /videos/{id}/player.json |
| [**setDefaultCaption()**](VideoApi.md#setDefaultCaption) | Set default caption | **PATCH** /videos/{id}/captions/{lan} |
| [**uploadPart()**](VideoApi.md#uploadPart) | Upload part of video | **POST** /videos/{id}/part |
| [**uploadVideoComplete()**](VideoApi.md#uploadVideoComplete) | Get upload video when complete | **GET** /videos/{id}/complete |
| [**create()**](MediaApi.md#create) | Create media object | **POST** /media/create |
| [**update()**](MediaApi.md#update) | update media info | **PATCH** /media/{id} |
| [**delete()**](MediaApi.md#delete) | Delete media | **DELETE** /media/{id} |
| [**uploadThumbnail()**](MediaApi.md#uploadThumbnail) | Upload media thumbnail | **POST** /media/{id}/thumbnail |
| [**deleteThumbnail()**](MediaApi.md#deleteThumbnail) | Delete media thumbnail | **DELETE** /media/{id}/thumbnail |
| [**createCaption()**](MediaApi.md#createCaption) | Create a new media caption | **POST** /media/{id}/captions/{lan} |
| [**deleteCaption()**](MediaApi.md#deleteCaption) | Delete a media caption | **DELETE** /media/{id}/captions/{lan} |
| [**getCaptions()**](MediaApi.md#getCaptions) | Get media captions | **GET** /media/{id}/captions |
| [**getCost()**](MediaApi.md#getCost) | get media transcoding cost | **GET** /media/cost |
| [**getDetail()**](MediaApi.md#getDetail) | get media detail | **GET** /media/{id} |
| [**getMediaList()**](MediaApi.md#getMediaList) | Get user videos list | **POST** /media |
| [**getMediaPlayerInfo()**](MediaApi.md#getMediaPlayerInfo) | Get media object | **GET** /media/{id}/player.json |
| [**setDefaultCaption()**](MediaApi.md#setDefaultCaption) | Set default caption | **PATCH** /media/{id}/captions/{lan} |
| [**uploadMediaComplete()**](MediaApi.md#uploadMediaComplete) | Get upload media when complete | **GET** /media/{id}/complete |
| [**uploadPart()**](MediaApi.md#uploadPart) | Upload part of media | **POST** /media/{id}/part |


<a name="create"></a>
## **`create()` - Create video object**
## **`create()` - Create media object**


Create a video object
Create a media object

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **request** | [**CreateMediaRequest**](../model/CreateMediaRequest.md)| **yes**| video&#39;s info |
| **request** | [**CreateMediaRequest**](../model/CreateMediaRequest.md)| **yes**| media&#39;s info |


### Return type
Expand All @@ -44,15 +44,15 @@ Promise<[**CreateMediaResponse**](../model/CreateMediaResponse.md)>.
---

<a name="update"></a>
## **`update()` - update video info**
## **`update()` - update media info**


### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| video&#39;s id |
| **input** | [**UpdateVideoInfoRequest**](../model/UpdateVideoInfoRequest.md)| **yes**| input |
| **id** | **string**| **yes**| media&#39;s id |
| **input** | [**UpdateMediaInfoRequest**](../model/UpdateMediaInfoRequest.md)| **yes**| input |


### Return type
Expand All @@ -65,16 +65,16 @@ Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.
---

<a name="delete"></a>
## **`delete()` - Delete video**
## **`delete()` - Delete media**


Delete a video by video ID.
Delete a media by media ID.

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| Video ID |
| **id** | **string**| **yes**| Media ID |


### Return type
Expand All @@ -87,15 +87,15 @@ Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.
---

<a name="uploadThumbnail"></a>
## **`uploadThumbnail()` - Upload video thumbnail**
## **`uploadThumbnail()` - Upload media thumbnail**


### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| video&#39;s id |
| **file** | **string \| Readable \| Buffer**| **yes**| file video to be uploaded |
| **id** | **string**| **yes**| media&#39;s id |
| **file** | **string \| Readable \| Buffer**| **yes**| file media to be uploaded |


### Return type
Expand All @@ -108,14 +108,14 @@ Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.
---

<a name="deleteThumbnail"></a>
## **`deleteThumbnail()` - Delete video thumbnail**
## **`deleteThumbnail()` - Delete media thumbnail**


### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| video&#39;s id |
| **id** | **string**| **yes**| media&#39;s id |


### Return type
Expand All @@ -128,40 +128,40 @@ Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.
---

<a name="createCaption"></a>
## **`createCaption()` - Create a new video caption**
## **`createCaption()` - Create a new media caption**


Uploads a VTT file and creates a new video caption for the specified video.
Uploads a VTT file and creates a new media caption for the specified media.

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| Video ID |
| **id** | **string**| **yes**| Media ID |
| **lan** | **string**| **yes**| Language |
| **file** | **string \| Readable \| Buffer**| **yes**| VTT File |


### Return type

Promise<[**CreateVideoCaptionResponse**](../model/CreateVideoCaptionResponse.md)>.
Promise<[**CreateMediaCaptionResponse**](../model/CreateMediaCaptionResponse.md)>.




---

<a name="deleteCaption"></a>
## **`deleteCaption()` - Delete a video caption**
## **`deleteCaption()` - Delete a media caption**


Delete a caption in a specific language by providing the video ID for the video you want to delete the caption from and the language the caption is in.
Delete a caption in a specific language by providing the media ID for the media you want to delete the caption from and the language the caption is in.

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| Video ID |
| **id** | **string**| **yes**| Media ID |
| **lan** | **string**| **yes**| Language |


Expand All @@ -175,34 +175,34 @@ Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.
---

<a name="getCaptions"></a>
## **`getCaptions()` - Get video captions**
## **`getCaptions()` - Get media captions**


Retrieves a list of video captions for the specified video.
Retrieves a list of media captions for the specified media.

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| Video ID |
| **id** | **string**| **yes**| Media ID |
| **offset** | **number**| no| offset, allowed values greater than or equal to 0. Default(0) |
| **limit** | **number**| no| results per page. Allowed values 1-100, default is 25 |


### Return type

Promise<[**GetVideoCaptionsResponse**](../model/GetVideoCaptionsResponse.md)>.
Promise<[**GetMediaCaptionsResponse**](../model/GetMediaCaptionsResponse.md)>.




---

<a name="getCost"></a>
## **`getCost()` - get video transcoding cost**
## **`getCost()` - get media transcoding cost**


get video transcoding cost
get media transcoding cost

### Parameters

Expand All @@ -223,29 +223,29 @@ Promise<[**GetTranscodeCostResponse**](../model/GetTranscodeCostResponse.md)>.
---

<a name="getDetail"></a>
## **`getDetail()` - get video detail**
## **`getDetail()` - get media detail**


Retrieve the video details by video id.
Retrieve the media details by media id.

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| video&#39;s id |
| **id** | **string**| **yes**| mediav&#39;s id |


### Return type

Promise<[**GetVideoDetailResponse**](../model/GetVideoDetailResponse.md)>.
Promise<[**GetMediaDetailResponse**](../model/GetMediaDetailResponse.md)>.




---

<a name="getVideoList"></a>
## **`getVideoList()` - Get user videos list**
<a name="getMediaList"></a>
## **`getMediaList()` - Get user videos list**


Retrieve a list of videos for the authenticated user.
Expand All @@ -254,35 +254,35 @@ Retrieve a list of videos for the authenticated user.

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **request** | [**GetVideoListRequest**](../model/GetVideoListRequest.md)| **yes**| video&#39;s info |
| **request** | [**GetMediaListRequest**](../model/GetMediaListRequest.md)| **yes**| video&#39;s info |


### Return type

Promise<[**GetVideoListResponse**](../model/GetVideoListResponse.md)>.
Promise<[**GetMediaListResponse**](../model/GetMediaListResponse.md)>.




---

<a name="getVideoPlayerInfo"></a>
## **`getVideoPlayerInfo()` - Get video object**
<a name="getMediaPlayerInfo"></a>
## **`getMediaPlayerInfo()` - Get media object**


Get video object
Get media object

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| Video ID |
| **id** | **string**| **yes**| media ID |
| **token** | **string**| no| Token |


### Return type

Promise<[**GetVideoPlayerInfoResponse**](../model/GetVideoPlayerInfoResponse.md)>.
Promise<[**GetMediaPlayerInfoResponse**](../model/GetMediaPlayerInfoResponse.md)>.



Expand All @@ -293,13 +293,13 @@ Promise<[**GetVideoPlayerInfoResponse**](../model/GetVideoPlayerInfoResponse.md)
## **`setDefaultCaption()` - Set default caption**


Set default caption for a video
Set default caption for a media

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| Video ID |
| **id** | **string**| **yes**| Media ID |
| **lan** | **string**| **yes**| Language |


Expand All @@ -310,13 +310,35 @@ Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.



---

<a name="uploadMediaComplete"></a>
## **`uploadMediaComplete()` - Get upload media when complete**


Get upload media when complete.

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| media&#39;s id |


### Return type

Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.




---

<a name="uploadPart"></a>
## **`uploadPart()` - Upload part of video**
## **`uploadPart()` - Upload part of media**


Upload part of video
Upload part of media

### Parameters

Expand Down Expand Up @@ -363,27 +385,5 @@ const res = await uploadSession.uploadLastPart('test/data/10m.mp4.part.c'); //
console.log(result);
```

---

<a name="uploadVideoComplete"></a>
## **`uploadVideoComplete()` - Get upload video when complete**


Get upload video when complete.

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| video&#39;s id |


### Return type

Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.




---

Loading
Loading