SDKs overview
Catch The Show provides a suite of Software Development Kits (SDKs) and supports community-contributed libraries to facilitate integration with its video platform. These SDKs abstract the underlying RESTful API interactions, authentication, and data serialization, allowing developers to focus on application logic rather than low-level networking details. The primary SDKs are developed and maintained by Catch The Show, ensuring compatibility and optimal performance with the platform's features, including the Live API, Video On Demand API, and Interactive Video API. Utilizing an SDK can reduce development time and potential errors compared to direct API calls, particularly for complex operations like managing live streams, uploading video assets, or handling interactive elements. The comprehensive Catch The Show documentation portal offers detailed guides and examples for each SDK, aiding developers in rapid prototyping and production deployments.
Integrating video functionalities often involves managing multimedia streams, encoding, and delivery, which can be resource-intensive. SDKs simplify these tasks by providing high-level functions, such as initializing a live stream, fetching video metadata, or embedding a player. This approach aligns with common development practices for cloud-based services, where SDKs serve as the preferred interface for programmatic access. For example, AWS provides extensive SDKs for its various services, streamlining cloud resource management for developers across different programming languages, as detailed in the AWS SDK for JavaScript Developer Guide. Similarly, Google Cloud offers client libraries that simplify interaction with its APIs, enabling developers to integrate services like Google Cloud Storage or Compute Engine into their applications efficiently, as outlined in the Google Cloud Client Libraries documentation. Catch The Show's SDKs follow this pattern, offering a consistent and developer-friendly experience for integrating video capabilities.
Official SDKs by language
Catch The Show officially supports SDKs for several popular programming languages, each designed to provide idiomatic access to the platform's functionalities. These SDKs are maintained directly by Catch The Show and are the recommended method for integrating with the API. Each SDK is regularly updated to reflect new API features and improvements. Developers can find specific versioning information and release notes within the official Catch The Show documentation.
| Language | Package Name | Install Command | Maturity |
|---|---|---|---|
| JavaScript | @catchtheshow/sdk-js |
npm install @catchtheshow/sdk-js or yarn add @catchtheshow/sdk-js |
Stable |
| Python | catchtheshow-sdk-py |
pip install catchtheshow-sdk-py |
Stable |
| Go | github.com/catchtheshow/sdk-go |
go get github.com/catchtheshow/sdk-go |
Stable |
| Ruby | catchtheshow-sdk-ruby |
gem install catchtheshow-sdk-ruby |
Stable |
The JavaScript SDK is particularly useful for web and Node.js environments, enabling client-side and server-side interactions with the video platform. The Python SDK is favored by backend developers and data scientists for its versatility in scripting and server-side applications. Go's SDK offers strong performance characteristics for concurrent operations, making it suitable for high-throughput video processing or streaming services. The Ruby SDK provides a concise and expressive interface, often preferred for web applications built with frameworks like Ruby on Rails. Each SDK is designed to handle common tasks such as authentication with API keys, making requests to various API endpoints, and parsing responses, thereby reducing the boilerplate code required for integration.
Installation
Installing the Catch The Show SDKs is typically performed using the standard package manager for each respective programming language. Ensure you have the correct package manager installed and configured for your development environment. Below are the common installation steps for each official SDK.
JavaScript SDK (Node.js & Web)
For Node.js projects or front-end web applications bundled with tools like Webpack or Rollup, use npm or yarn:
# Using npm
npm install @catchtheshow/sdk-js
# Or using yarn
yarn add @catchtheshow/sdk-js
After installation, you can import the SDK into your JavaScript or TypeScript files:
import { CatchTheShowClient } from '@catchtheshow/sdk-js';
const client = new CatchTheShowClient({ apiKey: 'YOUR_API_KEY' });
Python SDK
For Python environments, install the SDK using pip, the Python package installer:
pip install catchtheshow-sdk-py
Once installed, you can import the library and initialize the client:
from catchtheshow_sdk import CatchTheShowClient
client = CatchTheShowClient(api_key='YOUR_API_KEY')
Go SDK
For Go projects, use the go get command to fetch the module:
go get github.com/catchtheshow/sdk-go
Then, import and use it in your Go code:
package main
import (
"fmt"
"github.com/catchtheshow/sdk-go/pkg/catchtheshow"
)
func main() {
client := catchtheshow.NewClient("YOUR_API_KEY")
fmt.Println(client)
}
Ruby SDK
For Ruby applications, add the gem to your Gemfile or install it directly using gem:
# In your Gemfile
gem 'catchtheshow-sdk-ruby'
# Then run
bundle install
# Or directly install
gem install catchtheshow-sdk-ruby
After installation, require the gem and initialize the client:
require 'catchtheshow-sdk'
client = CatchTheShow::Client.new(api_key: 'YOUR_API_KEY')
In all cases, remember to replace 'YOUR_API_KEY' with your actual Catch The Show API key, which can be generated and managed in your Catch The Show developer dashboard.
Quickstart example
This quickstart demonstrates how to create a new live stream using the Catch The Show Python SDK. This example assumes you have already installed the Python SDK and have an API key configured. The process involves initializing the client, defining stream parameters, and calling the appropriate API method. More detailed quickstarts for other languages and API functionalities, such as video-on-demand uploads or interactive session management, are available in the Catch The Show quickstart guides.
Python: Create a Live Stream
import os
from catchtheshow_sdk import CatchTheShowClient
from catchtheshow_sdk.models import LiveStreamCreateRequest
# Replace 'YOUR_API_KEY' or set it as an environment variable
API_KEY = os.getenv('CATCHTHESHOW_API_KEY', 'YOUR_API_KEY')
if not API_KEY or API_KEY == 'YOUR_API_KEY':
print("Error: CATCHTHESHOW_API_KEY not set. Please set your API key.")
exit(1)
try:
# Initialize the Catch The Show client
client = CatchTheShowClient(api_key=API_KEY)
# Define the request body for creating a live stream
create_request = LiveStreamCreateRequest(
title="My First Live Stream",
description="An example live stream created via the Python SDK.",
is_public=True, # Make the stream publicly viewable
tags=["demo", "python", "live"]
)
print(f"Attempting to create live stream with title: {create_request.title}")
# Call the API to create the live stream
live_stream = client.live_streams.create(create_request)
print("Live Stream Created Successfully!")
print(f"Stream ID: {live_stream.id}")
print(f"Stream Key: {live_stream.stream_key}")
print(f"RTMP Ingest URL: {live_stream.rtmp_ingest_url}")
print(f"Playback URL: {live_stream.playback_url}")
print(f"Status: {live_stream.status}")
except Exception as e:
print(f"An error occurred: {e}")
This script first initializes the client with your API key. It then constructs a LiveStreamCreateRequest object with desired properties like title, description, and visibility. Finally, it makes an API call to create the live stream and prints the details of the newly created stream, including the essential stream_key and rtmp_ingest_url needed to push video content to the stream. The playback_url is provided for viewers to watch the live content.
Community libraries
While Catch The Show provides official SDKs for major languages, the developer community often contributes additional libraries, tools, and integrations. These community-driven projects can extend functionality, offer integrations with specific frameworks, or provide utilities not covered by the official SDKs. Examples might include wrapper libraries for front-end frameworks like React or Vue, command-line interfaces (CLIs) for managing resources, or specialized tools for analytics and monitoring.
Catch The Show encourages community contributions and often features notable projects in its developer community section. When using community libraries, it is advisable to review their documentation, license, and maintenance status, as they may not carry the same level of official support or guarantees as the first-party SDKs. Developers looking to contribute can often find guidelines and existing projects on platforms like GitHub, which serves as a common host for open-source API client libraries, as described in their GitHub Apps documentation.
Community libraries can be particularly beneficial for specific use cases or niche integrations. For instance, a developer might create a library that simplifies integrating Catch The Show's interactive video features with a particular game engine, or a tool that automates the generation of dynamic thumbnails for video-on-demand assets. These contributions reflect the diverse needs of the developer ecosystem and expand the creative applications of the Catch The Show platform. Before embarking on a new integration, consulting the Catch The Show community forums or GitHub repositories might reveal existing solutions or active discussions that could accelerate development or provide valuable insights.