View Source Wordnik.Word.Audio (Wordnik v1.0.1)

audio information about requested word, including link to audio recording

Wordnik Docs

Link to this section Summary

Types

parsed JSON response to get_audio/2 query

map of optional parameters that can be passed to get_audio/2 query

Functions

get audio information for requested word, including link to recording

Link to this section Types

@type audio() :: [
  %{
    attributionText: String.t(),
    attributionUrl: String.t(),
    audioType: String.t(),
    commentCount: integer(),
    createdAt: String.t(),
    createdBy: String.t(),
    description: String.t(),
    duration: integer(),
    fileUrl: String.t(),
    id: integer(),
    voteAverage: integer(),
    voteCount: integer(),
    voteWeightedAverage: integer(),
    word: String.t()
  }
]

parsed JSON response to get_audio/2 query

@type audio_params() :: %{
  optional(:limit) => integer(),
  optional(:use_canonical) => boolean()
}

map of optional parameters that can be passed to get_audio/2 query

Link to this section Functions

Link to this function

get_audio(word, params \\ %{})

View Source
@spec get_audio(String.t(), audio_params()) :: {:error, String.t()} | {:ok, 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, limit: 5})

response

Response

Wordnik.Word.Audio.audio/0

wordnik-docs

Wordnik Docs

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