DolbyIO.Rest 1.3.1

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package DolbyIO.Rest --version 1.3.1
NuGet\Install-Package DolbyIO.Rest -Version 1.3.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DolbyIO.Rest" Version="1.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DolbyIO.Rest --version 1.3.1
#r "nuget: DolbyIO.Rest, 1.3.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DolbyIO.Rest as a Cake Addin
#addin nuget:?package=DolbyIO.Rest&version=1.3.1

// Install DolbyIO.Rest as a Cake Tool
#tool nuget:?package=DolbyIO.Rest&version=1.3.1

Build NuGet Package Publish NuGet Package .NET Nuget License

Dolby.io REST APIs Client for .NET

.NET wrapper for the dolby.io REST Communications, Streaming and Media APIs.

Install this SDK

If you want to use NuGet, use the following command:

dotnet add package DolbyIO.Rest

Authentication

To get an access token that will be used by your server to perform backend operations like creating a conference, use the following code. This is only for the Communications and Media APIs.

using DolbyIO.Rest;

const string APP_KEY = "app_key";
const string APP_SECRET = "app_secret";

using DolbyIOClient client = new DolbyIOClient();

JwtToken jwt = await client.Authentication.GetApiAccessTokenAsync(APP_KEY, APP_SECRET);

To request a particular scope for this access token:

using DolbyIO.Rest;

const string APP_KEY = "app_key";
const string APP_SECRET = "app_secret";

using DolbyIOClient client = new DolbyIOClient();

JwtToken jwt = await client.Authentication.GetApiAccessTokenAsync(
    APP_KEY,
    APP_SECRET,
    3600,
    new string[] { "comms:client_access_token:create" }
);

Communications Examples

Get a Client Access Token

To get an access token that will be used by the client SDK for an end user to open a session against dolby.io, use the following code:

using DolbyIO.Rest;
using DolbyIO.Rest.Models;

const string APP_KEY = "app_key";
const string APP_SECRET = "app_secret";

using DolbyIOClient client = new DolbyIOClient();

JwtToken apiToken = await client.Authentication.GetApiAccessTokenAsync(
    APP_KEY,
    APP_SECRET,
    3600,
    new string[] { "comms:client_access_token:create" }
);

JwtToken cat = await client.Communications.Authentication
    .GetClientAccessTokenV2Async(apiToken, new string[] {"*"});

Create a conference

To create a Dolby Voice conference, you first must retrieve an API Access Token, then use the following code to create the conference.

using DolbyIO.Rest;
using DolbyIO.Rest.Communications.Models;
using DolbyIO.Rest.Models;

const string APP_KEY = "app_key";
const string APP_SECRET = "app_secret";

using DolbyIOClient client = new DolbyIOClient();

JwtToken jwt = await client.Authentication.GetApiAccessTokenAsync(
    APP_KEY,
    APP_SECRET,
    3600,
    new string[] { "comms:conf:create" }
);

CreateConferenceOptions options = new CreateConferenceOptions
{
    Alias = "Conference Name",
    OwnerExternalId = "Fabien"
};

Conference conference = await client.Conferences.CreateAsync(jwt, options);

Real-time Streaming Examples

Create a publish token

using System;
using DolbyIO.Rest;
using DolbyIO.Rest.Streaming.Models;
using Newtonsoft.Json;

using DolbyIOClient client = new DolbyIOClient();

CreatePublishToken create = new CreatePublishToken
{
    Label = "My token",
    Streams = new List<PublishTokenStream>
    {
        new PublishTokenStream
        {
            StreamName = "feedA"
        }
    }
};
PublishToken token = await client.Streaming.PublishToken.CreateAsync("api_secret", create);

Create a subscribe token

using System;
using DolbyIO.Rest;
using DolbyIO.Rest.Streaming.Models;
using Newtonsoft.Json;

using DolbyIOClient client = new DolbyIOClient();

CreateSubscribeToken create = new CreateSubscribeToken
{
    Label = "My token",
    Streams = new List<SubscribeTokenStream>
    {
        new SubscribeTokenStream
        {
            StreamName = "feedA"
        }
    }
};
SubscribeToken token = await client.Streaming.SubscribeToken.CreateAsync("api_secret", create);

Media Examples

Start an enhance job

To start an enhance job, use the following code:

using System;
using DolbyIO.Rest;
using DolbyIO.Rest.Models;
using Newtonsoft.Json;

const string APP_KEY = "app_key";
const string APP_SECRET = "app_secret";

using DolbyIOClient client = new DolbyIOClient();

JwtToken jwt = await client.Authentication.GetApiAccessTokenAsync(APP_KEY, APP_SECRET);

string jobDescription = JsonConvert.SerializeObject(new {
    content = new { type = "podcast" },
    input = "dlb://in/file.mp4",
    output = "dlb://out/file.mp4"
});

string jobId = await client.Media.Enhance.StartAsync(jwt, jobDescription);
Console.WriteLine($"Job ID: {jobId}");
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.1 1,113 6/19/2023
1.3.0 117 6/7/2023
1.2.3 173 3/29/2023
1.2.2 204 3/8/2023
1.2.1 212 2/18/2023
1.2.0 229 2/1/2023
1.1.0 236 1/31/2023
1.0.0 253 1/24/2023