A .NETStandard client for the Pessl Instruments GmbH RESTful API.
- hhttps://www.nuget.org/packages/FieldClimate.Pessl/
dotnet add package FieldClimate.Pessl
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
var pesslConfiguration = new PesslConfiguration("YOUR_PUBLIC_KEY", "YOUR_PRIVATE_KEY");
services
.AddFieldClimatePessl(pesslConfiguration);
}
}
public class PesslChartController : ControllerBase
{
private readonly IChartService _chartService;
public PesslChartController(IChartService chartService)
{
_chartService = chartService;
}
}
- it is necessary to create the following environment variables
#zshrc
echo "export PESSL_PUBLIC_KEY=<YOUR_PESSL_PUBLIC_KEY>" >> ~/.zshrc && \
echo "export PESSL_PRIVATE_KEY=<PESSL_PRIVATE_KEY>" >> ~/.zshrc && \
source ~/.zshrc
#bashrc
echo "export PESSL_PUBLIC_KEY=<YOUR_PESSL_PUBLIC_KEY>" >> ~/.bashrc && \
echo "export PESSL_PRIVATE_KEY=<PESSL_PRIVATE_KEY>" >> ~/.bashrc && \
source ~/.bashrc
nuget setapikey <key>
rm -rf nupkgs && \
dotnet clean -c Release && dotnet build -c Release && \
dotnet pack src/Fieldclimate.Pessl.Domain/Fieldclimate.Pessl.Domain.csproj --no-build --no-restore -c Release -o nupkgs && \
nuget push nupkgs/*.nupkg -Source nuget.org