rhymebrain 1.0.0-dev.1 copy "rhymebrain: ^1.0.0-dev.1" to clipboard
rhymebrain: ^1.0.0-dev.1 copied to clipboard

An API wrapper for RhymeBrain.com. This allows you to get rhymes, portmanteaus, and info about a word.

RhymeBrain.com API wrapper Dart #

This is a API wrapper for RhymeBrain.com written in the Dart programming language, its intended to be a free and easy way to get rhymes for a word using dart.

Warning: This package does not have a stable version yet, it may not work as intended, please submit an issue if something is wrong with it, it needs more organized and concise documentation as well.

Features #

  • Get Rhymes of a word
  • Get Portmanteaus's of a word
  • Get Info for a word

Future Features #

  • Cache

Getting started #

Note: According to RhymeBrain Documentation, you may only make 350 requests per hour.

Installtion is simple, run dart pub add rhymebrain

Pub.dev RhymeBrain Library

Usage #

For any response that has .offensive, .confident, or .common, these are derived from flags (which are represented as a string containing the letters a, b, or/and c in RhymeBrain.com) in the response field from RhymeBrain API, these just represent whether the flag is present or not, the rest of the interface should follow pretty closely to the API responses, this is a quality of life feature so you dont have to mess with checking for flags yourself, the raw String flags are also available using .flags in some cases.

Basic Usage:

final rbclient = RhymeBrain();

/// If you would like to cache data, you need to add the cache and set the duration, the client will automatically handle the management of the cache for you, so you can use library as normal.
final rbclient = RhymeBrain(Cache(refreshEvery: Duration(minutes: 10)));

How to get rhymes #

Detailed Example This returns an array of info about words that rhyme with a given word, in the below, we use the example word "test":

await rbclient.getRhymes(RhymeParams(word: "test", maxResults?: 100));

How to get Portmanteaus #

Detailed Example This returns an array of Portmanteau's, these are words that are combined together into one word. You pass one word, and it fines words to create Portmanteaus with:

await rbclient.getPortmanteaus(PortmanteausParams(word: "test"));

How to get Word Info #

Detailed Example

await rbclient.getWordInfo(WordInfoParams(word: "test"));

Additional information #

RhymeBrain.com requires you to adknowledge them in your app in some way, shape, or form, in a public manner, when you use their systems as part of your application. Regardless of license, because of these rules, you are required to adknowledge them if you plan on using their service.

Please refer to RhymeBrain Documentation for a better understanding of the API, and remember to adknowledge them for usage of their API.

There is also a ISO639-1 to refer to for valid country codes.

More information on phonetics:

0
likes
130
pub points
0%
popularity

Publisher

unverified uploader

An API wrapper for RhymeBrain.com. This allows you to get rhymes, portmanteaus, and info about a word.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on rhymebrain