jiffy: Download a random gif from giphy

Description Usage Arguments Value Examples

Description

Download a random gif from giphy.

Usage

1
2
3
4
5
jiffy_random(tag = NULL, type = "gifs", what = "original",
  format = "gif", dest = NULL, quiet = FALSE)

jiffy_translate(phrase, type = "gifs", what = "original", format = "gif",
  dest = NULL, quiet = FALSE)

Arguments

tag

An optional tag to search on. If omitted then you git a random image pulled from the giphy's trending stream (I believe).

type

Either "gifs" or "stickers" (or a partial string match to either). The default is to return gifs.

what

The type of image to download. original will always be available but giphy supplies fixed_height, fixed_width downsized, etc. See names(x$images) for possible options for a given image. The default is to download the original (largest) gif.

format

The format to download in. Default is gif, but mp4 and webp are often available (for what="looping" the only option is mp4.

dest

Destination to download the file to. Default is a temporary file.

quiet

Logical indicating if progress bars during download should be suppressed.

phrase

A phrase to search for

Value

A filename of the downloaded file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# Download a random cat:
gif <- jiffy_random("cat")
show_gif(gif)

# MRW someone suggests not using stringsAsFactors=FALSE
gif <- jiffy_translate("hell no")
show_gif(gif)

## End(Not run)

richfitz/jiffy documentation built on May 27, 2019, 8:18 a.m.