imguR (version 0.1.5)

imguRupload: Uploads an image file to imgur.com

Description

Takes an image file, and uploads it to imgur.com using the anonymous API and returns a list containing details of where the image is hosted.

Usage

imguRupload(filename, title = NULL, caption = NULL, name = basename(filename), apikey = "4feb29d00face5bc1b9dae536e15c373")

Arguments

filename
Name of the file to be uploaded to imgur.com
title
Image title passed to the imguR API
caption
Image title passed to the imguR API
name
Image title passed to the imguR API
apikey
The anonymous API key provided by imgur for the imguR package - this allows 50 image uploads per hour.

Value

  • A list parsed from the imguR JSON response after uploading the plot (see the imgur API for details)

References

http://www.imgur.com http://github.com/astatham/imgur-R-Package

See Also

imguR dev.off

Examples

Run this code
tmpfile <- tempfile()
pdf(tmpfile)
plot(x=1:10, y=-1:-10, col=1:10, pch=19, main="oh hai dere")
dev.off()
temp <- imguRupload(tmpfile)
cat(temp["links.imgur_page"])

Run the code above in your browser using DataCamp Workspace