Livepeer Ruby Library
The Livepeer Ruby library provides convenient access to the Livepeer Studio API from applications written in Ruby.
Documentation
For full documentation and examples, please visit docs.livepeer.org.
Installation
Install the library:
gem install livepeer
If you want to build the gem from source:
gem build livepeer.gemspec
Requirements
- Ruby: = 3.0
Usage
The library needs to be configured with your Livepeer Studio account's API key, which is available in the Studio Dashboard
require_relative livepeer
lpClient = Livepeer::SDK.new
lpClient.config_security(
security=Shared::Security.new(
api_key="",
)
)
# retrieve all streams
res = lpClient.stream.get_all()
if ! res.data.nil?
# handle response
end
Available Resources and Operations
Stream
- get_all - Retrieve streams
- create - Create a stream
- delete - Delete a stream
- get - Retrieve a stream
- update - Update a stream
- create_clip - Create a clip
- get_all_clips - Retrieve clips of a livestream
MultistreamTarget
- get_all - Retrieve Multistream Targets
- create - Create a multistream target
- delete - Delete a multistream target
- get - Retrieve a multistream target
- update - Update Multistream Target
Webhook
- get_all - Retrieve a Webhook
- create - Create a webhook
- delete - Delete a webhook
- get - Retrieve a webhook
- update - Update a webhook
Asset
- get_all - Retrieve assets
- create - Upload an asset
- create_via_url - Upload asset via URL
- delete - Delete an asset
- get - Retrieves an asset
- update - Update an asset
Metrics
- get_viewership - Query viewership metrics
- get_creator_viewership - Query creator viewership metrics
- get_public_total_views - Query public total views metrics
- get_usage - Query usage metrics
Session
- get_all - Retrieve sessions
- get - Retrieve a session
- get_recorded - Retrieve Recorded Sessions
- get_all_clips - Retrieve clips of a session
AccessControl
- get_signing_keys - Retrieves signing keys
- create_signing_key - Create a signing key
- delete_signing_key - Delete Signing Key
- get_signing_key - Retrieves a signing key
- update_signing_key - Update a signing key
Task
Transcode
- create - Transcode a video
Playback
- get - Retrieve Playback Info