get_templates: Get meme templates

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/get_templates.r

Description

Get a list of meme templates

Usage

1
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.

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.

Value

A list of objects of class “meme_template”.

Author(s)

Thomas J. Leeper

References

memegenerator API

imgflip API

memecaptain

See Also

create_meme

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# use imgflip
t1 <- get_templates("imgflip")

# use memegenerator
t2 <- get_templates("memegenerator")

# use memecaptain
t3 <- get_templates("memecaptain")

## End(Not run)

leeper/meme documentation built on May 21, 2019, 12:37 a.m.