CSharpUlmDsl 1.0.4

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

// Install CSharpUlmDsl as a Cake Tool
#tool nuget:?package=CSharpUlmDsl&version=1.0.4                

CSharpUlmDsl

dotnet nuget version nuget downloads build GitHub license

C# client for fetching emails from the temp mail service ulm-dsl.

Installation

Available on NuGet.

dotnet add package CSharpUlmDsl

or

PM> Install-Package CSharpUlmDsl

Usage

The following examples use the email address max.mustermann@ulm-dsl.de. Just replace the inbox name max.mustermann to match your address.

Initialization

First create an instance of UlmDslClient by passing an instance of HttpClient to its constructor.

var httpClient = new HttpClient();

var client = new UlmDslClient(httpClient);

Get Inbox

You can fetch the basic information except the body for all emails in an inbox by calling the GetInbox / GetInboxAsync methods and passing the inbox name.

var emails = client.GetInbox("max.mustermann");
var emails = await client.GetInboxAsync("max.mustermann");

Get Mail by Id

You can get all available information for a specific email by calling the GetMailById / GetMailByIdAsync methods and passing the inbox name and email identifier.

var email = client.GetMailById("max.mustermann", 7);
var email = await client.GetMailByIdAsync("max.mustermann", 7);

Get Mails

You can get all available information for all emails in an inbox by calling the GetMails / GetMailsAsync methods and passing the inbox name.

var emails = client.GetMails("max.mustermann");
var emails = await client.GetMailsAsync("max.mustermann");

Dependency Injection

You can register the UlmDslClient in your Startup with a typed HttpClient.

builder.Services.AddHttpClient<UlmDslClient>();

Then inject the client wherever you like. E.g. in a controller:

[Route("Home")]
[ApiController]
public class HomeController : ControllerBase
{
    private readonly UlmDslClient _client;

    public HomeController(UlmDslClient client)
    {
        _client = client;
    }
}

API rate limits

The api is limited to about 100 requests per minute. So you should keep in mind when this client fires requests:

  • When you fetch your inbox only a single request gets fired.
  • When you fetch a specific email by id, two requests get fired. One for the basic information e.g. the sender and receiver and one for the email body.
  • When you fetch all emails a first request gets fired for the basic information of all emails and then another request per email to retrieve each email body.

So based on your inbox size you should think twice before you fetch all emails. Maybe it's better to just fetch the inbox and then retrieve a single email by id.

Here are some related projects:

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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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.4 295 3/8/2023
1.0.3 419 6/27/2022
1.0.2 418 6/27/2022
1.0.1 455 6/26/2022
1.0.0 465 6/26/2022