Learn R Programming

meme (version 0.1.0)

get_templates: Get meme templates

Description

Get a list of meme templates

Usage

get_templates(site = "memecaptain", type = NULL, query = NULL, ...)

Arguments

site
The site used to generate the meme. This is set by default if template is an object of class “meme_template”. One of “imgflip”, “memegenerator”, or “memecaptain” (the default).
type
If site is “memegenerator”, optionally one of “new”, “popular” (the implicit default), “trending”, “related”, or “search” to return a different subset of template images. For “related” and “search”, query should specify an image name or search term, respectively.
query
When site is “memegenerator” and type is “related” or “search”, query should specify an image name or search term, respectively.
...
Additional arguments to curlPerform.

Value

“meme_template”.

Details

This function retrieves a list of template images from the specified site, which can then be passed to create_meme for generating a meme image. The resulting list of objects are of class “meme_template”, which has an associated S3 print method that will display the template image as a margin-free JPEG plot in the current graphics device.

References

memegenerator API

imgflip API

memecaptain

See Also

create_meme

Examples

Run this code
## Not run: 
# # use imgflip
# t1 <- get_templates("imgflip")
# 
# # use memegenerator
# t2 <- get_templates("memegenerator")
# 
# # use memecaptain
# t3 <- get_templates("memecaptain")
# ## End(Not run)

Run the code above in your browser using DataLab