FauxSharp 1.2.0
dotnet add package FauxSharp --version 1.2.0
NuGet\Install-Package FauxSharp -Version 1.2.0
<PackageReference Include="FauxSharp" Version="1.2.0" />
<PackageVersion Include="FauxSharp" Version="1.2.0" />
<PackageReference Include="FauxSharp" />
paket add FauxSharp --version 1.2.0
#r "nuget: FauxSharp, 1.2.0"
#addin nuget:?package=FauxSharp&version=1.2.0
#tool nuget:?package=FauxSharp&version=1.2.0
FauxSharp
FauxSharp is a simple C# SDK for communicating with FauxApi on PFSense
Build
Installation
Use Nuget to install FauxApi Sdk.
Install-Package FauxApi
Usage
FauxSharp can be easily used with dependency injection in Asp.net core. Just setup the services like so:
services.AddSingleton<IApiBaseService>(x => new ApiBaseService(new ClientBaseOptions("https://pfsense_fauxapi_host","apikey","apisecret",false,true)));
services.AddSingleton<IApiService, ApiService>();
The ApiBaseService can also be created without the CLientBaseOptions and you can configure it later, see further down. You can then inject the service in your own services etc. and call it:
await ApiService.SystemStats();
If you want to change / set the ClientBaseOptions outside of the service setup, just do this:
await ApiBaseService.UpdateConfiguration(new ClientBaseOptions("https://pfsense_fauxapi_host2","apikey2","apisecret2",false,true));
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- Newtonsoft.Json (>= 12.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.2.0 | 751 | 8/7/2020 |