We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create a rest endpoint like /joikes that returns {"joke": "..."} Then I will add that random joke on http://lambda-study-group.github.io/
/joikes
{"joke": "..."}
The text was updated successfully, but these errors were encountered:
isn't it better to do a request to https://raw.githubusercontent.com/lambda-study-group/lambdinha-bot/master/jokes.json and select a random joke from the output? similarly to what we do on
def get_joke(number \\ "") do HTTPoison.get("https://raw.githubusercontent.com/lambda-study-group/lambdinha-bot/master/jokes.json") |> handle_response |> extract_joke(number) end def extract_joke(map, _number="") do {:ok, body} = map item = Enum.random body '#{item["joke"]}' end
Sorry, something went wrong.
Nice! I will do it!
github has a better uptime than lambdinha 😋
No branches or pull requests
create a rest endpoint like
/joikes
that returns{"joke": "..."}
Then I will add that random joke on http://lambda-study-group.github.io/
The text was updated successfully, but these errors were encountered: