imguR (version 1.0.3)

update_album: Update album

Description

Update album metadata

Usage

update_album(album, id = NULL, title = NULL, description = NULL, privacy = NULL, layout = NULL, cover_id = NULL, ...)

Arguments

album
An album ID or object of class “imgur_album”. If no token is supplied, album must be a deletehash from the original create_album response.
id
A vector of one or more image IDs to add to the album or a list of objects of class “imgur_image”.
title
Optionally, an album title.
description
Optionally, an album description.
privacy
The privacy for the album. One of “public”, “hidden”, or “secret”.
layout
The layout for the album. One of “blog”, “grid”, “horizontal”, or “vertical”.)
cover_id
An image ID or an object of class “imgur_image”.
...
Other arguments passed to HTTP request functions, for example: token (an OAuth2.0 token) or key (an API key, used by default).

Value

“imgur_basic”.

Details

Updates the images or metadata of an album. All options are are optional. To anonymously update an album, album must be the deletehash value from create_album.

See Also

create_album

add_album_images

remove_album_images

set_album_images

Examples

Run this code
## Not run: 
# # update using a deletehash, anonymously
# i <- imgur()
# hist(rnorm(20))
# img <- imgur_off(i)
# a1 <-
# create_album(id = img,
#              title = 'My first Imgur album',
#              description = 'A simple album',
#              privacy = 'hidden',
#              layout = 'grid',
#              cover_id = img)
# update_album(a1$deletehash, title = 'My second Imgur album')
# 
# # update using an OAuth token
# tkn <- imgur_login()
# a2 <-
# create_album(id = img,
#              title = 'My first Imgur album',
#              description = 'A simple album',
#              privacy = 'hidden',
#              layout = 'grid',
#              cover_id = img,
#              token = tkn)
# update_album(a2, title = 'My second Imgur album')
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace