Learn how to create your first stream using the Livepeer Ruby SDK.
Prerequisites
Install the SDK
gem install livepeer
gem 'livepeer'
Initialize the SDK
require_relative livepeer lpClient = Livepeer::SDK.new lpClient.config_security( security=Shared::Security.new( api_key="", # Your API key ) )
Use the SDK
require_relative livepeer lpClient = Livepeer::SDK.new lpClient.config_security( security=Shared::Security.new( api_key="", ) ) req = Shared::NewStreamPayload.new( request=Shared::NewStreamPayload.new( name="test_stream", ), ) res = lpClient.stream.create(req) if ! res.data.nil? # handle response end
Was this page helpful?