(session)
Operations related to session api
- get_clips - Retrieve clips of a session
- get_all - Retrieve sessions
- get - Retrieve a session
- get_recorded - Retrieve Recorded Sessions
Retrieve clips of a session
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.session.get_clips(id="<id>")
if res.data is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | ID of the parent session |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetSessionClipsResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Retrieve sessions
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.session.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.GetSessionsResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Retrieve a session
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.session.get(id="<id>")
if res.session is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | ID of the session |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Retrieve Recorded Sessions
from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.session.get_recorded(parent_id="<value>", record=True)
if res.data is not None:
# handle response
pass
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
parent_id |
str | ✔️ | ID of the parent stream | |
record |
Optional[operations.Record] | ➖ | Flag indicating if the response should only include recorded sessions |
true |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetRecordedSessionsResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |