View Source Wordnik (Wordnik v1.0.0)
queries to the Wordnik API for word definitions, examples, related words, random words, and more
Link to this section Summary
Functions
get audio information for requested word, including link to recording
get definition(s) for requested word
get etymologies for requested word
get examples for requested word
get frequency for requested word
get hyphenation for requested word
get phrases for requested word
get pronunciations for requested word
get random_word for requested word
get random_words for requested word
get related_words for requested word
get scrabble_score for requested word
get top_example for requested word
get word_of_the_day for requested word
Link to this section Functions
@spec get_audio(String.t(), Wordnik.Word.Audio.audio_params()) :: {:error, String.t()} | {:ok, Wordnik.Word.Audio.audio()}
get audio information for requested word, including link to recording
parameters
Parameters
- limit: integer
- use_canonical: boolean
example
Example
iex> get_audio("Havana", %{use_canonical: true: true, limit: 5})
response
Response
t:Word.Audio.audio/0
wordnik-docs
Wordnik Docs
@spec get_definitions(String.t(), Wordnik.Word.Definitions.definitions_params()) :: {:error, String.t()} | {:ok, Wordnik.Word.Definitions.definitions()}
get definition(s) for requested word
parameters
Parameters
- use_canonical: boolean
- include_related: boolean
- include_tags: boolean
- limit: integer
- part_of_speech: string
- source_dictionaries: string
example
Example
iex> get_definitions("verbose", %{part_of_speech: "noun", limit: 5})
response
Response
t:Word.Definitions.definitions/0
wordnik-docs
Wordnik Docs
@spec get_etymologies(String.t(), Wordnik.Word.Etymologies.etymologies_params()) :: {:error, String.t()} | {:ok, Wordnik.Word.Etymologies.etymology()}
get etymologies for requested word
parameters
Parameters
- use_canonical: boolean
example
Example
iex> get_etymologies("verbose", %{use_canonical: true})
response
Response
t:Word.Etymologies.etymology/0
wordnik-docs
Wordnik Docs
@spec get_examples(String.t(), Wordnik.Word.Examples.examples_params()) :: {:error, String.t()} | {:ok, Wordnik.Word.Examples.examples()}
get examples for requested word
parameters
Parameters
- use_canonical: boolean
- include_duplicates: boolean
- limit: integer
- skip: integer
example
Example
iex> get_examples("verbose", %{use_canonical: true, limit: 5})
response
Response
t:Word.Examples.examples/0
wordnik-docs
Wordnik Docs
@spec get_frequency(String.t(), Wordnik.Word.Frequency.frequency_params()) :: {:error, String.t()} | {:ok, Wordnik.Word.Frequency.frequency()}
get frequency for requested word
parameters
Parameters
- use_canonical: boolean
- start_year: integer
- end_year: integer
example
Example
iex> get_frequency("verbose", %{use_canonical: true, start_year: 1990, end_year: 2000})
response
Response
t:Word.Frequency.frequency/0
wordnik-docs
Wordnik Docs
@spec get_hyphenation(String.t(), Wordnik.Word.Hyphenation.hyphenation_params()) :: {:error, String.t()} | {:ok, Wordnik.Word.Hyphenation.hyphenation()}
get hyphenation for requested word
parameters
Parameters
- use_canonical: boolean
- limit: integer
- source_dict: string
example
Example
iex> get_hyphenation("verbose", %{use_canonical: true})
response
Response
t:Word.Hyphenation.hyphenation/0
wordnik-docs
Wordnik Docs
@spec get_phrases(String.t(), Wordnik.Word.Phrases.phrases_params()) :: {:error, String.t()} | {:ok, Wordnik.Word.Phrases.phrases()}
get phrases for requested word
parameters
Parameters
- use_canonical: boolean
- limit: integer
- wlmi: string
example
Example
iex> get_phrases("verbose", %{use_canonical: true, limit: 5})
response
Response
t:Word.Phrases.phrases/0
wordnik-docs
Wordnik Docs
@spec get_pronunciations( String.t(), Wordnik.Word.Pronunciations.pronunciations_params() ) :: {:error, String.t()} | {:ok, Wordnik.Word.Pronunciations.pronunciations()}
get pronunciations for requested word
parameters
Parameters
- use_canonical: boolean
- limit: integer
- type_format: string
- source_dict: string
example
Example
iex> get_pronunciations("verbose", %{use_canonical: true, limit: 5})
response
Response
t:Word.Pronunciations.pronunciations/0
wordnik-docs
Wordnik Docs
https://developer.wordnik.com/docs#!/word/getTextPronunciations
@spec get_random_word(Wordnik.Words.RandomWord.random_word_params()) :: {:error, String.t()} | {:ok, Wordnik.Words.RandomWord.random_word()}
get random_word for requested word
parameters
Parameters
- has_dictionary_def: boolean
- include_part_of_speech: string
- exclude_part_of_speech: string
- min_corpus_count: integer
- max_corpus_count: integer
- min_dictionary_count: integer
- max_dictionary_count: integer
- min_length: integer
- max_length: integer
example
Example
iex> get_random_word( %{has_dictionary_def: true, min_length: 5})
response
Response
t:Words.RandomWord.random_word/0
wordnik-docs
Wordnik Docs
@spec get_random_words(Wordnik.Words.RandomWords.random_words_params()) :: {:error, String.t()} | {:ok, Wordnik.Words.RandomWords.random_words()}
get random_words for requested word
parameters
Parameters
- has_dictionary_def: boolean
- include_part_of_speech: string
- exclude_part_of_speech: string
- min_corpus_count: integer
- max_corpus_count: integer
- min_dictionary_count: integer
- max_dictionary_count: integer
- min_length: integer
- max_length: integer
- limit: integer
- sort_by: string
- sort_order: string
example
Example
iex> get_random_words(%{has_dictionary_def: true, sort_by: "alpha", sort_order: "asc"})
response
Response
t:Words.RandomWords.random_words/0
wordnik-docs
Wordnik Docs
@spec get_scrabble_score(String.t()) :: {:error, String.t()} | {:ok, Wordnik.Word.ScrabbleScore.scrabble_score()}
get scrabble_score for requested word
example
Example
iex> get_scrabble_score("verbose")
response
Response
t:Word.ScrabbleScore.scrabble_score/0
wordnik-docs
Wordnik Docs
@spec get_top_example(String.t(), Wordnik.Word.TopExample.top_example_params()) :: {:error, String.t()} | {:ok, Wordnik.Word.Examples.example()}
get top_example for requested word
parameters
Parameters
- use_canonical: boolean
example
Example
iex> get_top_example("verbose", %{use_canonical: true})
response
Response
t:Word.Examples.example/0
wordnik-docs
Wordnik Docs
@spec get_word_of_the_day(Wordnik.Words.WordOfTheDay.word_of_the_day_params()) :: {:error, String.t()} | {:ok, Wordnik.Words.WordOfTheDay.word_of_the_day()}
get word_of_the_day for requested word
parameters
Parameters
- date: string
example
Example
iex> get_word_of_the_day(%{date: "1985-12-31"})
response
Response
t:Words.WordOfTheDay.word_of_the_day/0