View Source Wordnik.Word.Examples (Wordnik v1.0.0)
examples for a given word
Link to this section Summary
Types
parsed JSON response to `get_examples/2` query
map of optional parameters that can be passed to get_examples/2
query
Functions
get examples for requested word
Link to this section Types
@type example() :: %{ provider: %{id: integer()}, year: integer(), rating: integer(), url: String.t(), word: String.t(), text: String.t(), documentId: integer(), exampleId: integer(), title: String.t() }
parsed JSON response to `get_examples/2` query
@type examples() :: %{examples: [example()]}
@type examples_params() :: %{ optional(:use_canonical) => boolean(), optional(:include_duplicates) => boolean(), optional(:limit) => integer(), optional(:skip) => integer() }
map of optional parameters that can be passed to get_examples/2
query
Link to this section Functions
@spec get_examples(String.t(), examples_params()) :: {:error, String.t()} | {:ok, 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