Skip to content

Latest commit

 

History

History
168 lines (105 loc) · 7.3 KB

README.md

File metadata and controls

168 lines (105 loc) · 7.3 KB

Session

(session)

Overview

Operations related to session api

Available Operations

get_clips

Retrieve clips of a session

Example Usage

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

Parameters

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.

Response

operations.GetSessionClipsResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

get_all

Retrieve sessions

Example Usage

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

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.GetSessionsResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

get

Retrieve a session

Example Usage

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

Parameters

Parameter Type Required Description
id str ✔️ ID of the session
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.GetSessionResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

get_recorded

Retrieve Recorded Sessions

Example Usage

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

Parameters

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.

Response

operations.GetRecordedSessionsResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /