No description, website, or topics provided.
C#
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Telestream.Cloud.SDK.Net45
Telestream.Cloud.SDK
.gitignore
README.md
Telestream.Cloud.SDK.sln

README.md

.NET Client for Telestream Cloud

How do I use it?

Configuration

To use Telestream Cloud SDK you need to configure client of Cloud API

    TelestreamCloudConfig.Initialize("ACCESS KEY", "SECRET KEY");

For default Host = "api.cloud.telestream.net", Version = "3.0", Port = 443;

You can change it using:

    TelestreamCloudConfig.Initialize("ACCESS KEY", "SECRET KEY", "api-us-east.cloud.telestream.net", "3.0", 443);

Custom configuration

For example, if you want to store your keys into app.config you can write your own class that implements IConfigurationService interface

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="Telestream.AccessKey" value="ACCESS KEY"/>
    <add key="Telestream.SecretKey" value="SECRET KEY"/>
  </appSettings>
</configuration>
  public class AppConfigConfigurationService : IConfigurationService
    {
        public ApiAccess Get()
        {
            var accessKey = ConfigurationManager.AppSettings["Telestream.AccessKey"];
            var secretKey = ConfigurationManager.AppSettings["Telestream.SecretKey"];

            return new ApiAccess(accessKey, secretKey);
        }
    }

And pass the instance to service client

var customConfig = new AppConfigConfigurationService();
var service = new FactoryService(customConfig, "FACTORY ID");

The client:

Each client is working in context of factory.

  var service = new FactoryService("FACTORY ID");

If you don't know your factory id you can get all factory information using TelestreamCloudService class:

  var service = new TelestreamCloudService();
  var myFactories = await service.GetFactories();