View Source Wordnik.Words.WordOfTheDay (Wordnik v1.0.0)

word of the day, searchable by date

Wordnik Docs

Link to this section Summary

Types

parsed JSON response to get_word_of_the_day/1 query

map of optional parameters that can be passed to get_word_of_the_day/1 query

Functions

get word_of_the_day for requested word

Link to this section Types

@type word_of_the_day() :: %{
  _id: String.t(),
  word: String.t(),
  contentProvider: %{name: String.t(), id: integer()},
  definitions: [
    %{
      source: String.t(),
      text: String.t(),
      note: any(),
      partOfSpeech: String.t()
    }
  ],
  publishDate: String.t(),
  examples: [
    %{url: String.t(), title: String.t(), text: String.t(), id: integer()}
  ],
  pdd: String.t(),
  note: String.t(),
  htmlExtra: any()
}

parsed JSON response to get_word_of_the_day/1 query

Link to this type

word_of_the_day_params()

View Source
@type word_of_the_day_params() :: %{optional(:date) => Formatter.Enums.date()}

map of optional parameters that can be passed to get_word_of_the_day/1 query

Link to this section Functions

Link to this function

get_word_of_the_day(params \\ %{})

View Source
@spec get_word_of_the_day(word_of_the_day_params()) ::
  {:error, String.t()} | {:ok, word_of_the_day()}

get word_of_the_day for requested word

parameters

Parameters

  • date: string

example

Example

iex> get_word_of_the_day("SECRET_API_KEY", %{date: "1985-12-31"})

response

Response

t:Words.WordOfTheDay.word_of_the_day/0

wordnik-docs

Wordnik Docs

https://developer.wordnik.com/docs#!/word/getWordOfTheDay