Description Usage Arguments Value Author(s) Examples
Retrieves jokes from API
1 2 3 4 5 |
type |
The endpoint type, one of general, knock-knock or programming. Default to general if nothing is provided. |
choice |
The choice type, one of random or ten. Default to random if nothing is provided. |
return_type |
The return_type, one of list or dataframe. Default to list if nothing is provided. |
List with all parameters of that joke
Ximing Zhang
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# Retrieve random general joke,return list
joke1 <- get_joke(type = "general",choice="random",return_type="list")
# Retrieve random programming joke,return dataframe
joke2 <- get_joke(type = "programming",choice="random",return_type="dataframe")
# Retrieve ten knock-knock jokes,return list
joke3 <- get_joke(type = "knock-knock",choice="ten",return_type="list")
# Retrieve ten general jokes,return dataframe
joke4 <- get_joke(type = "general",choice="ten",return_type="dataframe")
# Retrieve data with default value
joke5 <- get_joke()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.