exNoops v0.1.1 Exnoops.Hexbot View Source
Module to interact with Github's Noop: Hexbot
See the official noop
documentation for API information including the accepted parameters.
Link to this section Summary
Functions
Query Hexbot for color(s)
Link to this section Functions
Link to this function
get_color(opts \\ []) View Source
Query Hexbot for color(s)
- Parameters that accept multiple values should be put into the keyword list like
{:key, [value1, value2]}
. See example below.
Examples
iex> Exnoops.Hexbot.get_color()
{:ok, [{"#18453B", nil}]}
iex> Exnoops.Hexbot.get_color([count: 5, seed: ["FF7F50", "FFD700", "FF8C00"]])
{:ok,
[
{"#FFBB19", nil},
{"#FF8A0E", nil},
{"#FF8628", nil},
{"#FF9E00", nil},
{"#FF8433", nil}
]
}
iex> Exnoops.Hexbot.get_color([count: 5, width: 1000, height: 1000])
{:ok,
[
{"#2E84C5", {755, 331}},
{"#116BAA", {52, 998}},
{"#C742B2", {617, 478}},
{"#4C2BB9", {13, 183}},
{"#0C98FB", {604, 507}}
]
}