exNoops v0.1.1 Exnoops.Wordbot View Source

Module to interact with Github's Noop: Wordbot

See the official noop documentation for API information including the accepted parameters

Link to this section Summary

Functions

Query Wordbot for word(s)

Query Wordbot for word sets

Link to this section Functions

Link to this function

get_word(opts \\ []) View Source
get_word(keyword()) :: {atom(), list()}

Query Wordbot for word(s)

  • Parameters are sent with a keyword list into the function

Examples

iex> Exnoops.Wordbot.get_word()
{:ok, ["pepperoni"]}

iex> Exnoops.Wordbot.get_word([count: 7])
{:ok,
  [
    "extracorporeal",
    "behooves",
    "superregionals",
    "stepmother",
    "heckle",
    "clanks",
    "hippest"
  ]
}

iex> Exnoops.Wordbot.get_word([count: 4, set: "dinosaurs"])
{:ok,
  [
    "Xixiposaurus",
    "Ischyrosaurus",
    "Crocodylomorph",
    "Tatankaceratops"
  ]
}
Link to this function

get_word_sets() View Source
get_word_sets() :: {atom(), list()}

Query Wordbot for word sets

Examples

iex> Exnoops.Wordbot.get_word_sets()
{:ok,
  [
    "adjectives",
    "adverbs",
    "all",
    "animals",
    "cats",
    "common",
    "default",
    "dinosaurs",
    "dogs",
    "encouragement",
    "fabrics",
    "flowers",
    "fruits",
    "gemstones",
    "genres",
    "horses",
    "instruments",
    "knots",
    "menu",
    "metals",
    "moods",
    "nouns",
    "objects",
    "occupations",
    "prepositions",
    "rhymeless",
    "sports",
    "vegetables",
    "verbs",
    "verbs_past",
    "weather",
    "wrestlers"
  ]}