AMWD.Net.Api.FakeFilter 1.0.0

dotnet add package AMWD.Net.Api.FakeFilter --version 1.0.0
NuGet\Install-Package AMWD.Net.Api.FakeFilter -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="AMWD.Net.Api.FakeFilter" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AMWD.Net.Api.FakeFilter --version 1.0.0
#r "nuget: AMWD.Net.Api.FakeFilter, 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 AMWD.Net.Api.FakeFilter as a Cake Addin
#addin nuget:?package=AMWD.Net.Api.FakeFilter&version=1.0.0

// Install AMWD.Net.Api.FakeFilter as a Cake Tool
#tool nuget:?package=AMWD.Net.Api.FakeFilter&version=1.0.0

FakeFilter API

FakeFilter aims to monitor fake/temp e-mail providers, so site operators can distinguish whether the e-mail address is a serious client.

This is an implementation of the RESTful API of FakeFilter.net.

Installation

Just install the AMWD.Net.Api.FakeFilter package to your solution.

DotNet CLI

dotnet add package AMWD.Net.Api.FakeFilter

csproj file with SDK style

<ItemGroup>
  <PackageReference Include="AMWD.Net.Api.FakeFilter" Version="x.y.z" />
</ItemGroup>

Usage

Check whether the API is available
using var api = new FakeFilterApi();

if (await api.IsAvailable())
{
  Console.WriteLine("API is available");
}
else
{
  Console.Error.WriteLine("API is not available");
}
Check whether an e-mail address is used for fake
string fakeEmail = "something@10minmail.de";
string okEmail = "test@fakefilter.net";

using var api = new FakeFilterApi();
if (await api.IsAvailable())
{
  var fakeResult = await api.IsFakeEmail(fakeEmail);
  var okResult = await api.IsFakeEmail(okEmail);

  if (fakeResult.IsSuccess && fakeResult.IsFakeDomain)
    Console.WriteLine($"The e-mail '{fakeResult.Request}' should be blocked");

  if (okResult.IsSuccess && !okResult.IsFakeDomain)
    Console.WriteLine($"The e-mail '{okResult.Request}' can be processed");
}
else
{
  Console.Error.WriteLine("API not available");
}
Check whether a domain is used for fake
string fakeDomain = "10minmail.de";
string okDomain = "fakefilter.net";

using var api = new FakeFilterApi();
if (await api.IsAvailable())
{
  var fakeResult = await api.IsFakeDomain(fakeDomain);
  var okResult = await api.IsFakeDomain(okDomain);

  if (fakeResult.IsSuccess && fakeResult.IsFakeDomain)
    Console.WriteLine($"The domain '{fakeResult.Request}' should be blocked");

  if (okResult.IsSuccess && !okResult.IsFakeDomain)
    Console.WriteLine($"The domain '{okResult.Request}' can be processed");
}
else
{
  Console.Error.WriteLine("API not available");
}

The response model

FakeFilterResponse : object
{
  IsSuccess : bool;
  ErrorMessage: string;
  Request: string;
  IsFakeDomain: bool;
  Details: object
  {
    Providers: string[];
    Hosts: dictionary
    {
      Key: string,
      Value: object
      {
        Host: string;
        FirstSeen: datetime;
        LastSeen: datetime;
      }
    }
  }
}

Sources/Docs

Product 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. 
.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.0 177 3/28/2023