Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
* urbandictionary
Access the urbandictionary.com API from Erlang/OTP.
*Warning: This API is undocumented and probably meant for internal use only. Proceed with caution.*
Avoid abusing the API. Use rate limiting and caching.
Requirements:
- Requires Erlang 27 or newer :: Uses the new json module
- 0 external dependencies ::
** Installation
You can include it in your projects as a dependency in rebar.config:
#+BEGIN_SRC erlang
{deps, [%% ... Other dependencies
{urbandictionary, {git, "https://github.com/hyperimpose/urbandictionary.git", {tag, "0.2.0"}}}]}.
#+END_SRC
You can also quickly compile the library and start an Erlang shell for testing with: ~rebar3 shell~
** Usage
You can directly call the functions in the ~urbandictionary~ module:
#+BEGIN_SRC erlang
%% Get a list of definitions for a given query:
urbandictionary:define("irc").
#+END_SRC
See the [[./src/urbandictionary.erl][source code]] for all the available functions.
** License
This implementation of json is licensed under the [[https://spdx.org/licenses/BSD-3-Clause.html][BSD 3-Clause "New" or "Revised" License]].
A copy of this license is included in the file [[./COPYING][COPYING]].