A simple .NET wrapper for the website ICanHazDadJoke.com to get random dad jokes.
Available on NuGet: ICanHazDadJokeSharp
Just add the package to your .NET application.
You need to provide a name
and some contact details
which are used to create a custom User-Agent for the requests. Please see https://icanhazdadjoke.com/api#custom-user-agent for further information.
var name = "<Your Library Name>";
var contactDetails = "<Your Library Contact Details>";
var client = new DadJokeClient(name, contactDetails);
var joke = await client.GetRandomJokeAsync();