Skip to content

veldtech/Miki.UrbanDictionary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Miki.UrbanDictionary

A minimal wrapper around the UrbanDictionary website.

How to install the package

Get the package from nuget: https://www.nuget.org/packages/Miki.UrbanDictionary

dotnet add package Miki.UrbanDictionary

Example

The following code gets you the definition of our favourite idol: Miki!

using Miki.UrbanDictionary;

var urbanClient = new UrbanDictionaryApi();
var response = await urbanClient.SearchTermAsync("miki");
if(!response.Entries.Any()) {
  throw new InvalidOperationException("no definition found for term!");
}

Console.WriteLine($"The definition for miki is: {response.Entries.First().Definition}!");