UpdownDotnet 1.0.6

dotnet add package UpdownDotnet --version 1.0.6                
NuGet\Install-Package UpdownDotnet -Version 1.0.6                
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.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UpdownDotnet --version 1.0.6                
#r "nuget: UpdownDotnet, 1.0.6"                
#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.6

// Install UpdownDotnet as a Cake Tool
#tool nuget:?package=UpdownDotnet&version=1.0.6                

build and test

updown-dotnet

A simple Updown.io .NET Client

https://www.nuget.org/packages/UpdownDotnet

Don't currently utilize Updown.IO? Join here --> https://updown.io/r/WioVu

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.

State

Entity Implemented
Checks
Downtimes
Metrics
Nodes
Recipients
Status Pages

Usage

Example usage using Checks. Implementation across entities is similar. Though some entities may not support all methods.

Use manual tests for reference.

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");

Contributing

Use your favorite IDE to open the project. The project was developed using Visual Studio.

git clone https://github.com/strvmarv/updown-dotnet.git
cd updown-dotnet
dotnet restore
dotnet build

Run Tests

dotnet test
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.0.6 80 11/18/2024
1.0.5 74 11/15/2024
1.0.4 80 11/8/2024
1.0.3 78 11/7/2024
1.0.1 75 11/7/2024
1.0.0 74 11/6/2024

add netstandard2.0 support