Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

istreamlabs/python-sdk

Repository files navigation

openapi-client

This API provides a way to list, create, and run channels.

Channels consist of inputs (ingest), transcoding settings like codecs and bitrates, and outputs (publishing).

List calls use cursor-based pagination with RFC 5988 Link headers. Clients should read this header and follow the next link to read all pages of results.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://istreamplanet.com/contact/

Requirements.

Python >=3.6

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import openapi_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import openapi_client

Getting Started

Please follow the installation procedure and then run the following:

import time
import openapi_client
from pprint import pprint
from openapi_client.api import audit_operations_api
from openapi_client.model.channel_timeline_entry_list import ChannelTimelineEntryList
from openapi_client.model.error_model import ErrorModel
# Defining the host is optional and defaults to https://api.istreamplanet.com
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://api.istreamplanet.com"
)

# 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.

# Configure OAuth2 access token for authorization: authcode
configuration = openapi_client.Configuration(
    host = "https://api.istreamplanet.com"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Configure OAuth2 access token for authorization: m2m
configuration = openapi_client.Configuration(
    host = "https://api.istreamplanet.com"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'


# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = audit_operations_api.AuditOperationsApi(api_client)
    channel_id = "" # str | Unique channel identifier
offset = 1 # int | Number of items to skip when calling a paginated API (optional)

    try:
        # Get Channel Timeline
        api_response = api_instance.get_channel_timeline(channel_id, offset=offset)
        pprint(api_response)
    except openapi_client.ApiException as e:
        print("Exception when calling AuditOperationsApi->get_channel_timeline: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.istreamplanet.com

Class Method HTTP request Description
AuditOperationsApi get_channel_timeline GET /v2/channels/{channel-id}/timeline Get Channel Timeline
ChannelOperationsApi clear_dvr_window DELETE /v2/channels/{channel-id}/dvr-window Clear DVR Window
ChannelOperationsApi get_signals GET /v2/channels/{channel-id}/signal Get Signals
ChannelOperationsApi insert_id3 POST /v2/channels/{channel-id}/id3 Insert ID3
ChannelOperationsApi insert_scte35 POST /v2/channels/{channel-id}/scte35 Insert SCTE-35
ChannelOperationsApi preview_image GET /v2/channels/{channel-id}/preview-image Get Preview Image
ChannelOperationsApi program_end POST /v2/channels/{channel-id}/program-end Program End
ChannelOperationsApi program_start POST /v2/channels/{channel-id}/program-start Program Start
ChannelOperationsApi signal POST /v2/channels/{channel-id}/signal Generic Signal
ChannelOperationsApi slate_in POST /v2/channels/{channel-id}/slate Slate in
ChannelOperationsApi slate_out DELETE /v2/channels/{channel-id}/slate Slate out
ChannelOperationsApi splice_end POST /v2/channels/{channel-id}/splice-end Splice Insert End
ChannelOperationsApi splice_start POST /v2/channels/{channel-id}/splice-start Splice Insert Start
ChannelsApi delete_channel DELETE /v2/channels/{channel-id} Delete channel
ChannelsApi get_channel GET /v2/channels/{channel-id} Get Channel
ChannelsApi get_playback_config GET /v2/channels/{channel-id}/playback Get Channel Playback Config
ChannelsApi list_channels GET /v2/channels List channels
ChannelsApi put_channel PUT /v2/channels/{channel-id} Create/Update channel
SourcesApi get_source GET /v2/sources/{source-id} Get Source
SourcesApi list_sources GET /v2/sources List Sources

Documentation For Models

Documentation For Authorization

authcode

m2m

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes: N/A

Author

support@istreamplanet.com

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in openapi_client.apis and openapi_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from openapi_client.api.default_api import DefaultApi
  • from openapi_client.model.pet import Pet

Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
sys.setrecursionlimit(1500)
import openapi_client
from openapi_client.apis import *
from openapi_client.models import *

Releases

No releases published

Packages

No packages published