Spectra Rio Broker .NET SDK
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
SpectraLogic.SpectraRioBrokerClient.Integration.Test
SpectraLogic.SpectraRioBrokerClient.Test
SpectraLogic.SpectraRioBrokerClient
packages
.gitignore
.travis.yml
LICENSE.md
README.md
SpectraLogic.SpectraRioBrokerClient.sln
SpectraLogic.SpectraRioBrokerClient.sln.licenseheader rename projects Jun 21, 2018
buildNuGet.sh

README.md

Spectra Rio Broker .NET SDK

Build Status Apache V2 License

An SDK conforming to the Spectra Rio Broker specification.

Contact Us

Join us at our Google Groups forum to ask questions, or see frequently asked questions.

Setting up NuGet

The SDK is distributed as a NuGet package for .Net 4.5.2 and above. From the NuGet website:

What is NuGet?

NuGet is the package manager for the Microsoft development platform including .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery is the central package repository used by all package authors and consumers.

While the Spectra Rio Broker SDK is not yet in the NuGet Gallery, you can easily create a package feed on your computer using the latest release:

  1. Download the .nupkg file from the Releases page to a new directory of your choice.
  2. Follow the NuGet instructions on Creating Local Feeds using the directory that you've created.

This makes the Spectra Rio Broker SDK available for installation into a Visual Studio .NET Project.

Installing the Spectra Rio Broker SDK Into Your Own Project

  1. Open your existing .NET project or create a new one.
  2. Right-click the project and click "Manage NuGet Packages..."
  3. Choose the package source you created for the NuGet package.
  4. Click "Browse" on the left panel.
  5. In the search box on the upper right, type "SpectraRioBroker".
  6. Click the "Install" button on the right and close the package manager dialog.

Your project should now reference the SDK and be able to use its API.

About the API

SDK documentation can be found here Documentation

Instantiating the API

The example below shows how to configure and instantiate ISpectraRioBrokerClient

using SpectraLogic.SpectraRioBrokerClient;

namespace application
{
    class Class1
    {
        public ISpectraRioBrokerClient CreateClient()
        {
            var spectraRioBrokerClientBuilder = new SpectraRioBrokerClientBuilder("localhost", 5050);
            return spectraRioBrokerClientBuilder.DisableSslValidation().Build();
        }
    }
}

The example below shows how to use ISpectraRioBrokerClient and send a request to Spectra Rio Broker Server (ex. CreateToken)

using SpectraLogic.SpectraRioBrokerClient;
using SpectraLogic.SpectraRioBrokerClient.Calls;
using SpectraLogic.SpectraRioBrokerClient.Model;

namespace your.application
{
    class Class1
    {
        public ISpectraRioBrokerClient CreateClient()
        {
            var spectraRioBrokerClientBuilder = new SpectraRioBrokerClientBuilder("localhost", 5050);
            return spectraRioBrokerClientBuilder.DisableSslValidation().Build();
        }

        public IToken CreateToken()
        {
            var client = CreateClient();

            var request = new CreateTokenRequest("username", "password");
            return client.CreateToken(request);
        }
    }
}

For more examples and uses of the SDK SpectraLogic.SpectraRioBrokerClient.Integration.Test