Xtensos.SDK 3.0.2

dotnet add package Xtensos.SDK --version 3.0.2                
NuGet\Install-Package Xtensos.SDK -Version 3.0.2                
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="Xtensos.SDK" Version="3.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xtensos.SDK --version 3.0.2                
#r "nuget: Xtensos.SDK, 3.0.2"                
#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 Xtensos.SDK as a Cake Addin
#addin nuget:?package=Xtensos.SDK&version=3.0.2

// Install Xtensos.SDK as a Cake Tool
#tool nuget:?package=Xtensos.SDK&version=3.0.2                

Xtensos SDK

Overview

The Xtensos SDK is a tool designed for .NET developers to simplify the use of Xtensos's services. It currently supports Xtensos's Connect and Translate REST APIs. This SDK allows for rapid integration of both human and machine translation capabilities into your application.

Features

  1. Built-in and configurable retry policies.
  2. Individual service classes that mimic single API calls.
  3. Manager class for the Connect service, further easing the process of working with the API.

REST APIs

  1. Connect API: https://connect.xtensos.com/docs
  2. Translate API: https://translate-api.xtensos.com/docs

Development environment

  1. .NET Standard 2.0
  2. Visual Studio / Rider

SDK Usage Examples

Human Translation

ConnectService
using Xtensos.SDK.Client.Connect;
using Xtensos.SDK.Core.Connect.Settings;

var configuration = new Configuration(....)
var connectService = new ConnectService(configuration);
ConnectManager
using Xtensos.SDK.Client.Connect;
using Xtensos.SDK.Core.Connect.Settings;

var configuration = new Configuration(....)
var connectManager = new ConnectManager(configuration);

Machine Translation

using Xtensos.SDK.Client.Translate;
using Xtensos.SDK.Core.Translate.Settings;

var configuration = new Configuration(....)
var translationService = new TranslationService(configuration);

Retry policy configuration

All the services come with a preconfigured retry policy, set with a retry count of 5 and a retry duration of 500ms. If you wish to modify these settings, you can specify your preferences in the configuration.

using Xtensos.SDK.Client.Translate;
using Xtensos.SDK.Core.Translate.Settings;

var configuration = new Configuration(
    clientId,
    clientSecret,
    retryCount: 5,
    retryDuration: 500
);

var translationService = new TranslationService(configuration);

Custom Http Client

Xtensos.SDK allows to override HTTP client. To do so, you need to implement the IRestClientFactory interface, which as a result returns the RestSharp client.

public interface IRestClientFactory
{
    IRestClient Build(RestClientOptions restClientOptions);
}

Then you need to pass your implementation to the configuration.

using Xtensos.SDK.Client.Translate;
using Xtensos.SDK.Core.Translate.Settings;

var configuration = new Configuration(
    clientId,
    clientSecret,
    clientFactory: new MyCustomRestClientFactory()
);

var translationService = new TranslationService(configuration);
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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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 (1)

Showing the top 1 NuGet packages that depend on Xtensos.SDK:

Package Downloads
Xtensos.Connector.Episerver

Plugin for EPiServer/Optimizely for multilanguage content translation

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.2 93 7/1/2024
2.3.7 344 7/16/2024
2.3.6 148 7/2/2024

Changes since version 3.0.0

Features:
* Add support for new Language codes. (ISO 639-1 for language, optionally ISO 15924 for script, and ISO 3166-1 alpha-2 for country)
* Update Readme