Skip to content

Conversation

Inhishonor
Copy link
Contributor

This skill makes an api call to https://official-joke-api.appspot.com.
Most of the jokes are bad puns. :)
Satisfies request 2 in #66.

Copy link
Owner

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, just need to refine the sentences, thanks!

Copy link
Owner

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, now that I think of it, these jokes are only in English. Maybe we could use another API that has multilanguage jokes? This one has a handful languages https://jokeapi.dev/, I couldn't find ones with more languages. Then the JokeInfo should return isAvailable()==true only if the language is supported by the API.

@Inhishonor
Copy link
Contributor Author

Inhishonor commented Jul 26, 2025

I took care of that, and it is know calling that url. I enabled safe-mode by default, but am not sure if that needs to happen? Also, I found the jokes from the first api to be better, so I added an if block, to call the first api if the language is english, or the other one if that language is available. Other than that should be good to go.

@Inhishonor Inhishonor requested a review from Stypox July 26, 2025 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants