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
21 changes: 8 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Run unit tests
on: [push]
name: Run tests on PR to main
on:
pull_request:
branches:
- main

jobs:
test:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand Down Expand Up @@ -36,13 +40,4 @@ jobs:
- name: Run tests
run: npm test

- name: Create Pull Request
if: success() && github.ref != 'refs/heads/main'
run: |
gh pr create \
-B main \
-H ${{ github.ref_name }} \
--title "Merge ${{ github.ref_name }} into main" \
--body "Created by Github action after successful tests"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Changelog
All changes to this project will be documented in this file.
## [1.0.9] - 2025-01-15
- Update new sdk name

## [1.0.8] - 2025-01-15
- Update sdk api live stream
Expand Down
325 changes: 170 additions & 155 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/api/ApiKeyApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This endpoint enables you to create a new API key for a specific project.

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **request** | [**CreateApiKeyRequest**](../model/CreateApiKeyRequest.md)| **yes**| API key's data |
| **request** | [**CreateApiKeyRequest**](../model/CreateApiKeyRequest.md)| **yes**| api key's data |


### Return type
Expand Down
135 changes: 114 additions & 21 deletions docs/api/LiveStreamApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,48 @@ All URIs are relative to *http://localhost/api*

| Method | Description | HTTP request |
| ------------- | ------------- | ------------- |
| [**addMulticast()**](LiveStreamApi.md#addMulticast) | Add live stream multicast | **POST** /live_streams/multicast/{stream_key} |
| [**createLiveStreamKey()**](LiveStreamApi.md#createLiveStreamKey) | Create live stream key | **POST** /live_streams |
| [**createStreaming()**](LiveStreamApi.md#createStreaming) | Create a new live stream video | **POST** /live_streams/{id}/streamings |
| [**createStreaming()**](LiveStreamApi.md#createStreaming) | Create a new live stream media | **POST** /live_streams/{id}/streamings |
| [**deleteLiveStreamKey()**](LiveStreamApi.md#deleteLiveStreamKey) | Delete live stream key | **DELETE** /live_streams/{id} |
| [**deleteMulticast()**](LiveStreamApi.md#deleteMulticast) | Delete live stream multicast | **DELETE** /live_streams/multicast/{stream_key} |
| [**deleteStreaming()**](LiveStreamApi.md#deleteStreaming) | Delete live stream video | **DELETE** /live_streams/{id}/streamings/{stream_id} |
| [**getLiveStreamKey()**](LiveStreamApi.md#getLiveStreamKey) | Get live stream key | **GET** /live_streams/{id} |
| [**getLiveStreamKeys()**](LiveStreamApi.md#getLiveStreamKeys) | Get live stream key list | **GET** /live_streams |
| [**getLiveStreamPlayerInfo()**](LiveStreamApi.md#getLiveStreamPlayerInfo) | Get live stream video public | **GET** /live_streams/player/{id}/videos |
| [**getLiveStreamVideo()**](LiveStreamApi.md#getLiveStreamVideo) | Get live stream video | **GET** /live_streams/{id}/videos |
| [**getLiveStreamVideos()**](LiveStreamApi.md#getLiveStreamVideos) | Get live stream videos | **POST** /live_streams/{id}/videos |
| [**getStreaming()**](LiveStreamApi.md#getStreaming) | Get live stream video streaming | **GET** /live_streams/{id}/streamings/{stream_id} |
| [**getStreamings()**](LiveStreamApi.md#getStreamings) | Get live stream video streamings | **GET** /live_streams/{id}/streamings |
| [**getLiveStreamVideo()**](LiveStreamApi.md#getLiveStreamVideo) | Get live stream video | **GET** /live_streams/{id}/video |
| [**getMedias()**](LiveStreamApi.md#getMedias) | Get live stream media | **POST** /live_streams/{id}/videos |
| [**getMulticastByStreamKey()**](LiveStreamApi.md#getMulticastByStreamKey) | Get live stream multicast by stream key | **GET** /live_streams/multicast/{stream_key} |
| [**getStatisticByStreamMediaId()**](LiveStreamApi.md#getStatisticByStreamMediaId) | Get live stream statistic by stream media id | **GET** /live_streams/statistic/{stream_media_id} |
| [**getStreaming()**](LiveStreamApi.md#getStreaming) | Get live stream media streaming | **GET** /live_streams/{id}/streamings/{stream_id} |
| [**getStreamings()**](LiveStreamApi.md#getStreamings) | Get live stream media streamings | **GET** /live_streams/{id}/streamings |
| [**updateLiveStreamKey()**](LiveStreamApi.md#updateLiveStreamKey) | Update live stream key | **PUT** /live_streams/{id} |
| [**updateLiveStreamVideo()**](LiveStreamApi.md#updateLiveStreamVideo) | Update live stream video | **PUT** /live_streams/{id}/streamings |
| [**updateMedia()**](LiveStreamApi.md#updateMedia) | Update live stream media | **PUT** /live_streams/{id}/streamings |


<a name="addMulticast"></a>
## **`addMulticast()` - Add live stream multicast**


Add live stream multicast

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **streamKey** | **string**| **yes**| Live stream key. Use uuid |
| **data** | [**UpsertLiveStreamMulticastInput**](../model/UpsertLiveStreamMulticastInput.md)| **yes**| data |


### Return type

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




---

<a name="createLiveStreamKey"></a>
## **`createLiveStreamKey()` - Create live stream key**

Expand All @@ -42,10 +69,10 @@ Promise<[**CreateLiveStreamKeyResponse**](../model/CreateLiveStreamKeyResponse.m
---

<a name="createStreaming"></a>
## **`createStreaming()` - Create a new live stream video**
## **`createStreaming()` - Create a new live stream media**


Creates a new live stream video with the provided details
Creates a new live stream media with the provided details

### Parameters

Expand Down Expand Up @@ -84,6 +111,28 @@ Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.



---

<a name="deleteMulticast"></a>
## **`deleteMulticast()` - Delete live stream multicast**


Delete live stream multicast

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **streamKey** | **string**| **yes**| Live stream key. UUID string format |


### Return type

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




---

<a name="deleteStreaming"></a>
Expand Down Expand Up @@ -201,34 +250,78 @@ Promise<[**GetLiveStreamVideoResponse**](../model/GetLiveStreamVideoResponse.md)

---

<a name="getLiveStreamVideos"></a>
## **`getLiveStreamVideos()` - Get live stream videos**
<a name="getMedias"></a>
## **`getMedias()` - Get live stream media**


Get live stream videos for a specific live stream key
Get live stream media for a specific live stream key

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| Live stream key ID |
| **data** | [**GetLiveStreamVideosRequest**](../model/GetLiveStreamVideosRequest.md)| **yes**| data |
| **data** | [**GetLiveStreamMediasRequest**](../model/GetLiveStreamMediasRequest.md)| **yes**| data |


### Return type

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




---

<a name="getMulticastByStreamKey"></a>
## **`getMulticastByStreamKey()` - Get live stream multicast by stream key**


Get live stream multicast by stream key

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **streamKey** | **string**| **yes**| Live stream key. UUID string format |


### Return type

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




---

<a name="getStatisticByStreamMediaId"></a>
## **`getStatisticByStreamMediaId()` - Get live stream statistic by stream media id**


Get live stream statistic by stream media id

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **streamMediaId** | **string**| **yes**| Live stream media ID |


### Return type

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




---

<a name="getStreaming"></a>
## **`getStreaming()` - Get live stream video streaming**
## **`getStreaming()` - Get live stream media streaming**


Get live stream video streaming for a specific live stream key
Get live stream media streaming for a specific live stream key

### Parameters

Expand All @@ -248,10 +341,10 @@ Promise<[**GetStreamingResponse**](../model/GetStreamingResponse.md)>.
---

<a name="getStreamings"></a>
## **`getStreamings()` - Get live stream video streamings**
## **`getStreamings()` - Get live stream media streamings**


Get live stream video streamings for a specific live stream key
Get live stream media streamings for a specific live stream key

### Parameters

Expand Down Expand Up @@ -292,18 +385,18 @@ Promise<[**UpdateLiveStreamKeyResponse**](../model/UpdateLiveStreamKeyResponse.m

---

<a name="updateLiveStreamVideo"></a>
## **`updateLiveStreamVideo()` - Update live stream video**
<a name="updateMedia"></a>
## **`updateMedia()` - Update live stream media**


Update live stream video for a specific live stream key
Update live stream media. You can only update while live streaming.

### Parameters

| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| Live stream key ID |
| **data** | [**UpdateLiveStreamVideoRequest**](../model/UpdateLiveStreamVideoRequest.md)| **yes**| data |
| **data** | [**UpdateLiveStreamMediaRequest**](../model/UpdateLiveStreamMediaRequest.md)| **yes**| data |


### Return type
Expand Down
33 changes: 27 additions & 6 deletions docs/api/VideoApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ All URIs are relative to *http://localhost/api*
| [**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 player info | **GET** /videos/{id}/player.json |
| [**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 |
Expand All @@ -30,12 +31,12 @@ Create a video object

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


### Return type

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



Expand Down Expand Up @@ -104,6 +105,26 @@ Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.



---

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


### Parameters

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


### Return type

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




---

<a name="createCaption"></a>
Expand Down Expand Up @@ -245,10 +266,10 @@ Promise<[**GetVideoListResponse**](../model/GetVideoListResponse.md)>.
---

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


Get video player info
Get video object

### Parameters

Expand Down Expand Up @@ -301,7 +322,7 @@ Upload part of video
| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| video&#39;s id |
| **file** | **string \| Readable \| Buffer**| **yes**| File video to be uploaded |
| **file** | **string \| Readable \| Buffer**| **yes**| File media to be uploaded |
| **hash** | **string**| no| Md5 hash of part |
| **index** | **string**| no| Index of the part |
| **progressListener** | **(event: UploadProgressEvent) => void \| undefined** | no | Optional upload progress listener |
Expand Down
2 changes: 1 addition & 1 deletion docs/api/WebhookApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ This endpoint will update the indicated webhook.
| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| webhook&#39;s id |
| **request** | [**UpdateWebhookRequest**](../model/UpdateWebhookRequest.md)| **yes**| Update Webhook input, events example: video.encoding.quality.completed |
| **request** | [**UpdateWebhookRequest**](../model/UpdateWebhookRequest.md)| **yes**| Update Webhook input, events example: media.encoding.quality.completed |


### Return type
Expand Down
1 change: 1 addition & 0 deletions docs/model/ApiKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Name | Type | Description | Notes
**ttl** | **string** | | [optional]
**type** | **string** | | [optional]
**updatedAt** | **string** | | [optional]
**user** | [**User**](User.md) | | [optional]



1 change: 0 additions & 1 deletion docs/model/Asset.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**logo** | **string** | | [optional]
**logoImageLink** | **string** | | [optional]
**logoLink** | **string** | | [optional]

Expand Down
16 changes: 16 additions & 0 deletions docs/model/AudioConfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

# AudioConfig

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bitrate** | **number** | | [optional]
**channels** | **string** | | [optional]
**codec** | **string** | | [optional]
**index** | **number** | | [optional]
**language** | **string** | | [optional]
**sampleRate** | **number** | | [optional]



Loading