Bywatt.Integrations.Core
1.0.4
dotnet add package Bywatt.Integrations.Core --version 1.0.4
NuGet\Install-Package Bywatt.Integrations.Core -Version 1.0.4
<PackageReference Include="Bywatt.Integrations.Core" Version="1.0.4" />
<PackageVersion Include="Bywatt.Integrations.Core" Version="1.0.4" />
<PackageReference Include="Bywatt.Integrations.Core" />
paket add Bywatt.Integrations.Core --version 1.0.4
#r "nuget: Bywatt.Integrations.Core, 1.0.4"
#:package Bywatt.Integrations.Core@1.0.4
#addin nuget:?package=Bywatt.Integrations.Core&version=1.0.4
#tool nuget:?package=Bywatt.Integrations.Core&version=1.0.4
ByWatt.Integrations
Herbruikbare .NET-library voor technische koppelingen met externe systemen. Deze repository bevat uitsluitend de generieke Ninox REST API-client; er is geen ByWatt-domeinlogica in opgenomen.
Structuur
src/ByWatt.Integrations: reusable library metINinoxClient.src/ByWatt.Integrations.Worker: minimale ASP.NET Core-host met een health endpoint.tests/ByWatt.Integrations.Tests: unit tests zonder echte Ninox-calls.
Configuratie en registratie
Registreer de client in een host-applicatie met:
builder.Services.AddNinoxClient(builder.Configuration);
De configuratiesectie is Ninox:
Ninox:
ApiUrl: https://api.ninox.com/v1
TeamId: your-team
DatabaseId: your-database
ApiKey: your-api-key
Voor containers/Brainpod gebruikt .NET automatisch:
Ninox__ApiUrl
Ninox__TeamId
Ninox__DatabaseId
Ninox__ApiKey
Sla deze waarden alleen in secret/environment-configuratie op, nooit in broncode of Docker-images.
Gebruik
var record = await ninoxClient.GetRecordAsync<MyRecord>("Customers", 42);
var recordId = await ninoxClient.CreateRecordAsync("Customers", new { Name = "Ada" });
var rows = await ninoxClient.QueryAsync<List<MyRecord>>("select Customers");
await ninoxClient.ExecAsync("let x := 1;");
GetRecordsPagedAsync gebruikt de Ninox-parameters perPage en page; sommige Ninox/private-cloudversies ondersteunen die niet.
Worker en Docker
De worker luistert op poort 8080 en biedt GET /health. Hij accepteert zijn Ninox-configuratie via omgevingsvariabelen en logt naar stdout/stderr.
docker build -t bywatt-integrations .
docker run -p 8080:8080 bywatt-integrations
Lokale development en CI
dotnet restore ByWatt.Integrations.sln
dotnet build ByWatt.Integrations.sln --no-restore
dotnet test ByWatt.Integrations.sln --no-build
GitHub Actions voert bij pushes en pull requests restore, build, tests en een Docker-build uit. De workflow publiceert geen image.
Using ByWatt.Integrations as a private NuGet package
ByWatt.Integrations wordt als private package gepubliceerd naar GitHub Packages:
https://nuget.pkg.github.com/ByWattCPO/index.json
Consumer repositories, zoals ByWattCPO/bywatt-webhooks, kunnen daarna de library refereren met:
<PackageReference Include="ByWatt.Integrations" Version="1.0.0" />
Een consumer repository behoudt nuget.org voor publieke dependencies en voegt GitHub Packages toe in NuGet.Config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="github" value="https://nuget.pkg.github.com/ByWattCPO/index.json" />
</packageSources>
</configuration>
Private consumer repositories hebben tijdens restore authenticatie voor GitHub Packages nodig. Gebruik in GitHub Actions bij voorkeur GITHUB_TOKEN en geef de workflow packages: read. Controleer na de eerste publicatie in GitHub Packages bovendien dat ByWattCPO/bywatt-webhooks read access heeft tot het package ByWatt.Integrations.
Een package wordt uitsluitend gepubliceerd wanneer een version tag wordt gepusht. Maak de eerste release bijvoorbeeld zo:
git tag v1.0.0
git push origin v1.0.0
Dit start publish-package.yml en publiceert versie 1.0.0; de voorloop v wordt niet opgenomen in de NuGet-versie.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Bywatt.Integrations.Core:
| Package | Downloads |
|---|---|
|
ByWatt.Integrations
Shared integration clients for ByWatt .NET applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.