Xtensos.SDK
3.0.2
dotnet add package Xtensos.SDK --version 3.0.2
NuGet\Install-Package Xtensos.SDK -Version 3.0.2
<PackageReference Include="Xtensos.SDK" Version="3.0.2" />
paket add Xtensos.SDK --version 3.0.2
#r "nuget: Xtensos.SDK, 3.0.2"
// 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
- Built-in and configurable retry policies.
- Individual service classes that mimic single API calls.
- Manager class for the Connect service, further easing the process of working with the API.
REST APIs
- Connect API: https://connect.xtensos.com/docs
- Translate API: https://translate-api.xtensos.com/docs
Development environment
- .NET Standard 2.0
- 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 | Versions 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. |
-
.NETStandard 2.0
- Polly (>= 7.2.4)
- RestSharp (>= 110.2.0)
- SIL.ReleaseTasks (>= 2.5.0)
- System.IdentityModel.Tokens.Jwt (>= 6.25.0)
- System.Text.Json (>= 7.0.2)
- Xliff.OM.NetStandard (>= 1.0.2)
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.
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