UpdownDotnet 1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package UpdownDotnet --version 1.0.0
NuGet\Install-Package UpdownDotnet -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UpdownDotnet" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UpdownDotnet --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: UpdownDotnet, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install UpdownDotnet as a Cake Addin #addin nuget:?package=UpdownDotnet&version=1.0.0 // Install UpdownDotnet as a Cake Tool #tool nuget:?package=UpdownDotnet&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
updown-dotnet
A simple Updown.io .NET Client
Usage
Get all checks
var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var checks = await client.Checks();
Get check by token
var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var check = await client.Check("EXISTING-CHECK-TOKEN");
Create a check
Example: Create a check for https://your-url-here.com
var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var parameters = new CheckParameters
{
Url = "https://your-url-here.com",
};
var check = await client.CheckCreate(parameters);
Update a check
Example: Update the check period to 300 seconds
var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var updateParameters = new CheckParameters
{
Period = 300
};
var update = await client.CheckUpdate("EXISTING-CHECK-TOKEN", updateParameters);
Delete a check
var client = UpdownClientFactory.Create("YOUR-API-KEY-HERE");
var delete = await client.CheckDelete("EXISTING-CHECK-TOKEN");
Run Tests
dotnet test
Notes
- This client is a simple wrapper around the Updown.io API. It does not implement all the API endpoints.
- The client uses the System.Text.Json namespace to serialize and deserialize JSON data.
- The client is asynchronous and uses the HttpClient class to make HTTP requests to the Updown.io API.
- The HttpClient is implemented per Micrsoft recommendations. In this case, a Singleton that is reused.
- You may provide your own HttpClient instance if you want to manage the lifecycle of the HttpClient.
- Manual tests are provided if you'd like to observe the client in action. You will need to provide your own API key.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial version