Description Usage Arguments Value Author(s) References See Also Examples
This function provides the mechanism to upload an image to a flickr account, assuming that we have the relevant write privileges. One can specify a title, description, and control who can view the photo and the safety_level.
1 2 3 4 5 6 |
secret |
The secret for the API |
auth_token |
the authentication token obtained by the user granting
access to the Flickr account via |
api_key |
the key for the application making the request |
image |
the name of the file containing the image, or a character or raw vector giving the contents of the image |
title |
an optional title for the image to be displayed in Flickr |
description |
an optional description for the image to be displayed in Flickr |
is_family |
a logical value controlling whether the image can be viewed by family |
is_friend |
a logical value controlling whether the image can be viewed by friends |
is_public |
a logical value controlling whether the image can be viewed by everyone |
safety_level |
an integer/logical value controlling whether the image is safe for general viewing |
tags |
a character vector of tags to associate with the image |
... |
additional parameters that are passed on in the Flickr request |
.opts |
a list of CURL options |
curl |
a curl handle that can be reused across HTTP requests |
.url |
the URL of the REST services. This is rarely specified by the caller. |
The string id of the new photo.
Duncan Temple Lang
Flickr API, specifically http://www.flickr.com/services/api/upload.api.html.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
# we would need the secret, token and api_key
f = tempfile()
png(f)
plot(1:10)
dev.off()
o = flickr.upload(secret, token, api_key,
f, # the name of the file containing the picture
title = "A sample plot from R",
description = "Created in R via plot(1:10)",
content_type = "1",
is_family = "0",
is_friend = "0",
is_public = "0",
safety_level = "1",
tags = 'other',
.opts = list(verbose = TRUE, followlocation = TRUE))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.