Package video.api.client.api.clients
Class LiveStreamsApi
- java.lang.Object
-
- video.api.client.api.clients.LiveStreamsApi
-
public class LiveStreamsApi extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classLiveStreamsApi.APIlistRequest
-
Constructor Summary
Constructors Constructor Description LiveStreamsApi()Constructor for LiveStreamsApi production environment where API key is not required.LiveStreamsApi(String basePath)Constructor for LiveStreamsApi with custom API base path where API key is not required.LiveStreamsApi(String apiKey, String basePath)Constructor for LiveStreamsApi with custom API base pathLiveStreamsApi(ApiClient apiClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LiveStreamcreate(LiveStreamCreationPayload liveStreamCreationPayload)Create live stream A live stream will give you the 'connection point' to RTMP your video stream to api.video.ApiResponse<LiveStream>createWithHttpInfo(LiveStreamCreationPayload liveStreamCreationPayload)Create live stream A live stream will give you the 'connection point' to RTMP your video stream to api.video.voiddelete(String liveStreamId)Delete a live stream If you do not need a live stream any longer, you can send a request to delete it.LiveStreamdeleteThumbnail(String liveStreamId)Delete a thumbnail Send the unique identifier for a live stream to delete its thumbnail.ApiResponse<LiveStream>deleteThumbnailWithHttpInfo(String liveStreamId)Delete a thumbnail Send the unique identifier for a live stream to delete its thumbnail.ApiResponse<Void>deleteWithHttpInfo(String liveStreamId)Delete a live stream If you do not need a live stream any longer, you can send a request to delete it.LiveStreamget(String liveStreamId)Retrieve live stream Supply a liveStreamId, and you'll get all the details for streaming into, and watching the livestream.ApiClientgetApiClient()ApiResponse<LiveStream>getWithHttpInfo(String liveStreamId)Retrieve live stream Supply a liveStreamId, and you'll get all the details for streaming into, and watching the livestream.LiveStreamsApi.APIlistRequestlist()List all live streams With no parameters added to the url, this will return all livestreams.voidsetApiClient(ApiClient apiClient)LiveStreamupdate(String liveStreamId, LiveStreamUpdatePayload liveStreamUpdatePayload)Update a live stream Use this endpoint to update the player, or to turn recording on/off (saving a copy of the livestream).ApiResponse<LiveStream>updateWithHttpInfo(String liveStreamId, LiveStreamUpdatePayload liveStreamUpdatePayload)Update a live stream Use this endpoint to update the player, or to turn recording on/off (saving a copy of the livestream).LiveStreamuploadThumbnail(String liveStreamId, File file)Upload a thumbnail Upload an image to use as a backdrop for your livestream.ApiResponse<LiveStream>uploadThumbnailWithHttpInfo(String liveStreamId, File file)Upload a thumbnail Upload an image to use as a backdrop for your livestream.
-
-
-
Constructor Detail
-
LiveStreamsApi
public LiveStreamsApi(ApiClient apiClient)
-
LiveStreamsApi
public LiveStreamsApi()
Constructor for LiveStreamsApi production environment where API key is not required.
-
LiveStreamsApi
public LiveStreamsApi(String basePath)
Constructor for LiveStreamsApi with custom API base path where API key is not required.- Parameters:
basePath- the api base path. Expected Environment.PRODUCTION.basePath (default) or Environment.SANDBOX.basePath.
-
LiveStreamsApi
public LiveStreamsApi(String apiKey, String basePath)
Constructor for LiveStreamsApi with custom API base path- Parameters:
apiKey- the api key to use to authenticate to the APIbasePath- the api base path. Expected Environment.PRODUCTION.basePath (default) or Environment.SANDBOX.basePath.
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
create
public LiveStream create(LiveStreamCreationPayload liveStreamCreationPayload) throws ApiException
Create live stream A live stream will give you the 'connection point' to RTMP your video stream to api.video. It will also give you the details for viewers to watch the same livestream. The public=false 'private livestream' is available as a BETA feature, and should be limited to livestreams of 3,000 viewers or fewer. See our [Live Stream Tutorial](https://api.video/blog/tutorials/live-stream-tutorial) for a walkthrough of this API with OBS. Your RTMP endpoint for the livestream is rtmp://broadcast.api.video/s/{streamKey} Tutorials that [create live streams](https://api.video/blog/endpoints/live-create).- Parameters:
liveStreamCreationPayload- (required)- Returns:
- LiveStream
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request -
-
createWithHttpInfo
public ApiResponse<LiveStream> createWithHttpInfo(LiveStreamCreationPayload liveStreamCreationPayload) throws ApiException
Create live stream A live stream will give you the 'connection point' to RTMP your video stream to api.video. It will also give you the details for viewers to watch the same livestream. The public=false 'private livestream' is available as a BETA feature, and should be limited to livestreams of 3,000 viewers or fewer. See our [Live Stream Tutorial](https://api.video/blog/tutorials/live-stream-tutorial) for a walkthrough of this API with OBS. Your RTMP endpoint for the livestream is rtmp://broadcast.api.video/s/{streamKey} Tutorials that [create live streams](https://api.video/blog/endpoints/live-create).- Parameters:
liveStreamCreationPayload- (required)- Returns:
- ApiResponse<LiveStream>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request -
-
get
public LiveStream get(String liveStreamId) throws ApiException
Retrieve live stream Supply a liveStreamId, and you'll get all the details for streaming into, and watching the livestream. Tutorials that use the [show livestream endpoint](https://api.video/blog/endpoints/live-stream-status).- Parameters:
liveStreamId- The unique ID for the live stream you want to watch. (required)- Returns:
- LiveStream
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success -
-
getWithHttpInfo
public ApiResponse<LiveStream> getWithHttpInfo(String liveStreamId) throws ApiException
Retrieve live stream Supply a liveStreamId, and you'll get all the details for streaming into, and watching the livestream. Tutorials that use the [show livestream endpoint](https://api.video/blog/endpoints/live-stream-status).- Parameters:
liveStreamId- The unique ID for the live stream you want to watch. (required)- Returns:
- ApiResponse<LiveStream>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success -
-
update
public LiveStream update(String liveStreamId, LiveStreamUpdatePayload liveStreamUpdatePayload) throws ApiException
Update a live stream Use this endpoint to update the player, or to turn recording on/off (saving a copy of the livestream). NOTE: If the livestream is actively streaming, changing the recording status will only affect the NEXT stream. The public=false \"private livestream\" is available as a BETA feature, and should be limited to livestreams of 3,000 viewers or fewer.- Parameters:
liveStreamId- The unique ID for the live stream that you want to update information for such as player details, or whether you want the recording on or off. (required)liveStreamUpdatePayload- (required)- Returns:
- LiveStream
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request -
-
updateWithHttpInfo
public ApiResponse<LiveStream> updateWithHttpInfo(String liveStreamId, LiveStreamUpdatePayload liveStreamUpdatePayload) throws ApiException
Update a live stream Use this endpoint to update the player, or to turn recording on/off (saving a copy of the livestream). NOTE: If the livestream is actively streaming, changing the recording status will only affect the NEXT stream. The public=false \"private livestream\" is available as a BETA feature, and should be limited to livestreams of 3,000 viewers or fewer.- Parameters:
liveStreamId- The unique ID for the live stream that you want to update information for such as player details, or whether you want the recording on or off. (required)liveStreamUpdatePayload- (required)- Returns:
- ApiResponse<LiveStream>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 400 Bad Request -
-
delete
public void delete(String liveStreamId) throws ApiException
Delete a live stream If you do not need a live stream any longer, you can send a request to delete it. All you need is the liveStreamId.- Parameters:
liveStreamId- The unique ID for the live stream that you want to remove. (required)- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 204 No Content -
-
deleteWithHttpInfo
public ApiResponse<Void> deleteWithHttpInfo(String liveStreamId) throws ApiException
Delete a live stream If you do not need a live stream any longer, you can send a request to delete it. All you need is the liveStreamId.- Parameters:
liveStreamId- The unique ID for the live stream that you want to remove. (required)- Returns:
- ApiResponse<Void>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 204 No Content -
-
list
public LiveStreamsApi.APIlistRequest list()
List all live streams With no parameters added to the url, this will return all livestreams. Query by name or key to limit the list.- Returns:
- APIlistRequest
- Http Response Details:
Status Code Description Response Headers 200 Success -
-
uploadThumbnail
public LiveStream uploadThumbnail(String liveStreamId, File file) throws ApiException
Upload a thumbnail Upload an image to use as a backdrop for your livestream. Tutorials that [update live stream thumbnails](https://api.video/blog/endpoints/live-upload-a-thumbnail).- Parameters:
liveStreamId- The unique ID for the live stream you want to upload. (required)file- The image to be added as a thumbnail. The mime type should be image/jpeg, image/png or image/webp. The max allowed size is 8 MiB. (required)- Returns:
- LiveStream
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad Request - 404 Not Found -
-
uploadThumbnailWithHttpInfo
public ApiResponse<LiveStream> uploadThumbnailWithHttpInfo(String liveStreamId, File file) throws ApiException
Upload a thumbnail Upload an image to use as a backdrop for your livestream. Tutorials that [update live stream thumbnails](https://api.video/blog/endpoints/live-upload-a-thumbnail).- Parameters:
liveStreamId- The unique ID for the live stream you want to upload. (required)file- The image to be added as a thumbnail. The mime type should be image/jpeg, image/png or image/webp. The max allowed size is 8 MiB. (required)- Returns:
- ApiResponse<LiveStream>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 201 Created - 400 Bad Request - 404 Not Found -
-
deleteThumbnail
public LiveStream deleteThumbnail(String liveStreamId) throws ApiException
Delete a thumbnail Send the unique identifier for a live stream to delete its thumbnail.- Parameters:
liveStreamId- The unique identifier of the live stream whose thumbnail you want to delete. (required)- Returns:
- LiveStream
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 404 Not Found -
-
deleteThumbnailWithHttpInfo
public ApiResponse<LiveStream> deleteThumbnailWithHttpInfo(String liveStreamId) throws ApiException
Delete a thumbnail Send the unique identifier for a live stream to delete its thumbnail.- Parameters:
liveStreamId- The unique identifier of the live stream whose thumbnail you want to delete. (required)- Returns:
- ApiResponse<LiveStream>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- Http Response Details:
Status Code Description Response Headers 200 Success - 404 Not Found -
-
-