Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vaetas/urbandictionary

Urban Dictionary API for Dart/Flutter
https://github.com/vaetas/urbandictionary

api dart dictionary flutter urban-dictionary

Last synced: 3 days ago
JSON representation

Urban Dictionary API for Dart/Flutter

Awesome Lists containing this project

README

        

# Urban Dictionary API (Unofficial)

![Pub Version](https://img.shields.io/pub/v/urbandictionary)

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.

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

final client = UrbanDictionary(client: officialClient);
```

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

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

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

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