Open
Description
At the moment there is really only one project integration supported.
With one instance of ICalingaService
you can only access one calinga project, because it has its configured API token and project settings.
You could for sure instantiate multiple ICalingaService-instances with different backing configurations, when creating them by hand. But this raises the question how to deal with dependency injection and .AddSingleton()
as mentioned in the documentation for ASP.NET core integration.
It would be helpful, when either the documentation would be updated for supporting multiple project or the .NET SDK itself would have a way of supporting different project-configurations at runtime.
Sth like:
var projectA = calinga.Team("Team A").Project("Project A")
.WithAPIToken("***")
.WithDrafts(true)
.WithCacheInterval(30);
var translatedA = await projectA.GetTranslationsAsync("my-key");
// and for supporting current appsettings-configuration:
var projectB = calinga.Team("Team A").Project("Project B")
.WithConfiguration(nameof(CalingaServiceSettings));
var translatedB = await projectB.GetTranslationsAsync("my-key");