oriches / Dilbert

A .Net class library to access the Daily Dilbert cartoon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dilbert

NuGet Build status

A .Net class library to access the Daily Dilbert cartoon.

Supported versions:

.Net Framework v4.8 and higher,
.Net Core v3.1 and higher,

This library is available as a nuget [package] (https://www.nuget.org/packages/Daily.Dilbert.Service/).

You can get the daily cartoon as either a file written to the local file system temporary folder or as a .Net stream, the interface for the service is as follows:

public interface IDailyDilbertService
{
    Task<string> DailyAsFileAsync();

    Task<Stream> DailyAsStreamAsync();
}

There is a test project with a couple of tests, but a simple example of how to use this is shown below:

public async void Dilbert()
{
    var service = new DailyDilbertService();

    var filePath = await service.DailyAsFileAsync();   

    // Load the image as required....
}

About

A .Net class library to access the Daily Dilbert cartoon


Languages

Language:C# 100.0%