API wrapper for Urban Dictionary.
- Search a definition of term(s).
- Search a definition from Urban Dictionary id(s).
- Get auto complete word from Urban Dictionary.
- Get a random definitions.
var client = new UrbanDictionaryClient();
var results = await client.SearchTerm("hentai");
foreach(var item in results)
{
Console.WriteLine(item.DefId);
Console.WriteLine(item.Word);
Console.WriteLine(item.Definition);
Console.WriteLine();
}
var client = new UrbanDictionaryClient();
var results = await client.SearchTerm(new string[] { "hentai", "anime" });
foreach(var item in results)
{
Console.WriteLine(item.DefId);
Console.WriteLine(item.Word);
Console.WriteLine(item.Definition);
Console.WriteLine();
}
var client = new UrbanDictionaryClient();
var results = await client.SearchTerm(13675580);
foreach(var item in results)
{
Console.WriteLine(item.DefId);
Console.WriteLine(item.Word);
Console.WriteLine(item.Definition);
Console.WriteLine();
}
var client = new UrbanDictionaryClient();
var results = await client.SearchTerm(new uint[] { 13675580, 13675581 });
foreach(var item in results)
{
Console.WriteLine(item.DefId);
Console.WriteLine(item.Word);
Console.WriteLine(item.Definition);
Console.WriteLine();
}
var client = new UrbanDictionaryClient();
var results = await client.GetRandomTerm();
foreach(var item in results)
{
Console.WriteLine(item.DefId);
Console.WriteLine(item.Word);
Console.WriteLine(item.Definition);
Console.WriteLine();
}