Skip to content

alanedwardes/Ae.Gengo.Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ae.Gengo.Client

C# client for the Gengo translation service API - https://gengo.com/

Usage

With Microsoft.Extensions.DependencyInjection

IGengoConfigV2 config = new GengoConfigV2
{
    Key = "key",
    Secret = "secret"
};

ServiceCollection services = new ServiceCollection();

services.AddGengoClientV2(config, options => options.BaseAddress = new Uri("http://api.gengo.com/"));

IServiceProvider provider = services.BuildServiceProvider();

IGengoClientV2 client = provider.GetRequiredService<IGengoClientV2>();

With HTTP Client

IGengoConfigV2 config = new GengoConfigV2
{
    Key = "key",
    Secret = "secret"
};

var handler = new GengoHandlerV2(config)
{
    InnerHandler = new HttpClientHandler()
};

var httpClient = new HttpClient(handler)
{
    BaseAddress = new Uri("http://api.gengo.com/")
};

IGengoClientV2 client = new GengoClientV2(httpClient);

About

C# client for the Gengo translation service API - https://gengo.com/

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages