peertube_python_api/docs/StaticVideoFilesApi.md
2024-01-14 12:30:33 +02:00

9.9 KiB

peertube.StaticVideoFilesApi

All URIs are relative to https://peertube2.cpy.re

Method HTTP request Description
static_streaming_playlists_hls_filename_get GET /static/streaming-playlists/hls/{filename} Get public HLS video file
static_streaming_playlists_hls_private_filename_get GET /static/streaming-playlists/hls/private/{filename} Get private HLS video file
static_web_videos_filename_get GET /static/web-videos/{filename} Get public Web Video file
static_web_videos_private_filename_get GET /static/web-videos/private/{filename} Get private Web Video file

static_streaming_playlists_hls_filename_get

static_streaming_playlists_hls_filename_get(filename)

Get public HLS video file

Example

  • OAuth Authentication (OAuth2):
import peertube
from peertube.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://peertube2.cpy.re
# See configuration.py for a list of all supported configuration parameters.
configuration = peertube.Configuration(
    host = "https://peertube2.cpy.re"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with peertube.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = peertube.StaticVideoFilesApi(api_client)
    filename = 'filename_example' # str | Filename

    try:
        # Get public HLS video file
        api_instance.static_streaming_playlists_hls_filename_get(filename)
    except Exception as e:
        print("Exception when calling StaticVideoFilesApi->static_streaming_playlists_hls_filename_get: %s\n" % e)

Parameters

Name Type Description Notes
filename str Filename

Return type

void (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 successful operation -
403 invalid auth -
404 not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

static_streaming_playlists_hls_private_filename_get

static_streaming_playlists_hls_private_filename_get(filename, video_file_token=video_file_token, reinject_video_file_token=reinject_video_file_token)

Get private HLS video file

Example

  • OAuth Authentication (OAuth2):
import peertube
from peertube.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://peertube2.cpy.re
# See configuration.py for a list of all supported configuration parameters.
configuration = peertube.Configuration(
    host = "https://peertube2.cpy.re"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with peertube.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = peertube.StaticVideoFilesApi(api_client)
    filename = 'filename_example' # str | Filename
    video_file_token = 'video_file_token_example' # str | Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header. (optional)
    reinject_video_file_token = True # bool | Ask the server to reinject videoFileToken in URLs in m3u8 playlist (optional)

    try:
        # Get private HLS video file
        api_instance.static_streaming_playlists_hls_private_filename_get(filename, video_file_token=video_file_token, reinject_video_file_token=reinject_video_file_token)
    except Exception as e:
        print("Exception when calling StaticVideoFilesApi->static_streaming_playlists_hls_private_filename_get: %s\n" % e)

Parameters

Name Type Description Notes
filename str Filename
video_file_token str Video file token generated by PeerTube so you don't need to provide an OAuth token in the request header. [optional]
reinject_video_file_token bool Ask the server to reinject videoFileToken in URLs in m3u8 playlist [optional]

Return type

void (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 successful operation -
403 invalid auth -
404 not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

static_web_videos_filename_get

static_web_videos_filename_get(filename)

Get public Web Video file

PeerTube >= 6.0

Example

import peertube
from peertube.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://peertube2.cpy.re
# See configuration.py for a list of all supported configuration parameters.
configuration = peertube.Configuration(
    host = "https://peertube2.cpy.re"
)


# Enter a context with an instance of the API client
with peertube.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = peertube.StaticVideoFilesApi(api_client)
    filename = 'filename_example' # str | Filename

    try:
        # Get public Web Video file
        api_instance.static_web_videos_filename_get(filename)
    except Exception as e:
        print("Exception when calling StaticVideoFilesApi->static_web_videos_filename_get: %s\n" % e)

Parameters

Name Type Description Notes
filename str Filename

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 successful operation -
404 not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

static_web_videos_private_filename_get

static_web_videos_private_filename_get(filename, video_file_token=video_file_token)

Get private Web Video file

PeerTube >= 6.0

Example

  • OAuth Authentication (OAuth2):
import peertube
from peertube.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://peertube2.cpy.re
# See configuration.py for a list of all supported configuration parameters.
configuration = peertube.Configuration(
    host = "https://peertube2.cpy.re"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

configuration.access_token = os.environ["ACCESS_TOKEN"]

# Enter a context with an instance of the API client
with peertube.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = peertube.StaticVideoFilesApi(api_client)
    filename = 'filename_example' # str | Filename
    video_file_token = 'video_file_token_example' # str | Video file token [generated](#operation/requestVideoToken) by PeerTube so you don't need to provide an OAuth token in the request header. (optional)

    try:
        # Get private Web Video file
        api_instance.static_web_videos_private_filename_get(filename, video_file_token=video_file_token)
    except Exception as e:
        print("Exception when calling StaticVideoFilesApi->static_web_videos_private_filename_get: %s\n" % e)

Parameters

Name Type Description Notes
filename str Filename
video_file_token str Video file token generated by PeerTube so you don't need to provide an OAuth token in the request header. [optional]

Return type

void (empty response body)

Authorization

OAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 successful operation -
403 invalid auth -
404 not found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]