diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..9098a4d --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# JokeAPI for Kotlin/Java + +A simple Kotlin/Java library to retrieve jokes from [Sv443's JokeAPI](https://v2.jokeapi.dev/). + +## Examples (TL;DR) + +```kotlin +import net.thauvin.erik.jokeapi.JokeApi.Companion.getJoke + +val joke = getJoke() +val safe = getJoke(safe = true) +val pun = getJoke(category = Category.PUN) +``` + +A `Joke` class instance is returned: + +```kotlin +data class Joke( + val error: Boolean, + val category: Category, + val type: Type, + val joke: Set, + val flags: Set, + val id: Int, + val safe: Boolean, + val language: Language +) +```