1

Prerequisites

To get the most out of this guide, you’ll need to:

2

Install the SDK

Get the Livepeer Ruby SDK.

gem install livepeer
3

Initialize the SDK

The first step is to initialize the SDK with your Livepeer Studio API key.

require_relative livepeer

lpClient = Livepeer::SDK.new

lpClient.config_security(
  security=Shared::Security.new(
    api_key="", # Your API key
  )
)
4

Use the SDK

Now that you have the SDK installed and initialized, you can use it in your app. Let’s create a stream.

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

Next steps

Checkout Livepeer API Reference to learn more about the Livepeer API and the Ruby SDK.