This library is a .NET HTTP client for transformer.bee aka edifact-bo4e-converter.
It allows you to convert EDIFACT messages to BO4E and vice versa by speaking to Hochfreqeunz's transformer.bee service. Note that the actual conversion happens in the transformer.bee service/backend, this library only provides a convenient way to use its API.
First of all, you need an account to use transformer.bee. Ask info@hochfrequenz.de or ping @JoschaMetze on GitHub to get one.
You can check if your account is working by logging into our stage environment.
Install it from nuget TransformerBeeClient :
dotnet add package TransformerBeeClient
You need to provide something that implements ITransformerBeeAuthenticator
to the TransformerBeeClient
.
If you're hosting transformer.bee in the same network or your localhost and there is no authentication, you can use the NoAuthenticator
.
using TransformerBeeClient;
var myAuthenticator = new NoAuthenticationProvider();
If, which is more likely, Hochfrequenz provided you with a client Id and secret, you can use the ClientIdClientSecretAuthenticator
class like this:
using TransformerBeeClient;
var myAuthenticator = new ClientIdClientSecretAuthenticationProvider("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET");
This library is thought to be primarily used in ASP.NET Core applications.
That's why it assumes that you have an IHttpClientFactory
available in your dependency injection container.
See the ExampleAspNetCoreApplication/Program.cs
for a minimal working example.
If you're not using ASP.NET Core, you can still use this library but setting up th IHttpClientFactory
comes with a bit of boilerplate.
See the MweWithoutAspNetTest.cs
for a minimal working example.
To run the integration test login to your docker to access the transformer.bee image.
docker login ghcr.io -u YOUR_GITHUB_USERNAME
then paste your PAT similarly to described in the integration test CI pipeline
To release a new version of this library, create a new release in GitHub.
Make sure its tag starts with v
and the version number, e.g. v1.2.3
.
Tags without a release wont trigger the release workflow; This enforces that you have to write a changelog before releasing.
Releases are not restricted to the main branch but we prefer them to happen there.