(multistream)
Operations related to multistream api
- get_all - Retrieve Multistream Targets
- create - Create a multistream target
- get - Retrieve a multistream target
- update - Update Multistream Target
- delete - Delete a multistream target
Retrieve Multistream Targets
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.multistream.get_all()
if res.data is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetMultistreamTargetsResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Create a multistream target
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.multistream.create(request={
"url": "rtmps://live.my-service.tv/channel/secretKey",
})
if res.multistream_target is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
components.MultistreamTargetInput | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.CreateMultistreamTargetResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Retrieve a multistream target
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.multistream.get(id="<id>")
if res.multistream_target is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | ID of the multistream target |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetMultistreamTargetResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Update Multistream Target
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.multistream.update(id="<id>", multistream_target_patch_payload={
"url": "rtmps://live.my-service.tv/channel/secretKey",
})
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | ID of the multistream target |
multistream_target_patch_payload |
components.MultistreamTargetPatchPayload | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.UpdateMultistreamTargetResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Make sure to remove any references to the target on existing streams before actually deleting it from the API.
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.multistream.delete(id="<id>")
if res is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | ID of the multistream target |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.DeleteMultistreamTargetResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |