Skip to content

vaetas/urbandictionary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Urban Dictionary API (Unofficial)

Pub Version

This package provides basic API interface to Urban Dictionary. You can fetch specific definitions or get list of random word definitions.

You can use either official (internal) API or RapidAPI endpoint.

final officialClient = OfficialUrbanDictionaryClient();
final rapidApiClient = RapidApiUrbanDictionaryClient(key: 'YOUR_API_KEY');

final client = UrbanDictionary(client: officialClient);

To define specific word use define(String query) method.

client.define('wiseguy').then((response) {
  print(response);
});

To get list of random word definitions use random().

client.random().then((response) {
  print(response);
});