NAME
Imgur::API::Endpoint::Gallery
DESCRIPTION
Access to the imgur Gallery API Endpoint.
METHODS
get
Returns the images in the gallery. For example the main gallery is https://api.imgur.com/3/gallery/hot/viral/0.json
Parameters
sort
optionalviral | top | time | rising (only available with user section) - defaults to viral
window
optionalChange the date range of the request if the section is "top", day | week | month | year | all, defaults to day
section
optionalhot | top | user - defaults to hot
showViral
optionaltrue | false - Show or hide viral images from the 'user' section. Defaults to true
page
optionalinteger - the data paging number
memeSubgallery
View images for memes subgallery
Parameters
sort
optionalviral | time | top - defaults to viral
window
optionalChange the date range of the request if the sort is "top", day | week | month | year | all, defaults to week
page
optionalinteger - the data paging number
memeSubgalleryImage
View a single image in the memes gallery
Parameters
image_id
requiredThe ID for the image.
subreddit
View gallery images for a subreddit
Parameters
window
optionalChange the date range of the request if the sort is "top", day | week | month | year | all, defaults to week
sort
optionaltime | top - defaults to time
page
optionalinteger - the data paging number
subreddit
requiredpics - A valid subreddit name
subredditImage
View a single image in the subreddit
Parameters
image_id
requiredThe ID for the image.
subreddit
requiredpics - A valid subreddit name
tag
View images for a gallery tag
Parameters
t_name
requiredThe name of the tag.
window
optionalChange the date range of the request if the sort is "top", day | week | month | year | all, defaults to week
sort
optionalviral | time | top - defaults to viral
page
optionalinteger - the data paging number
tagImage
View a single image in a gallery tag
Parameters
t_name
requiredThe name of the tag.
image_id
requiredThe ID for the image.
itemTags
View tags for a gallery item
Parameters
gallery
requiredGallery
id
requiredID of the gallery item
tagVote
Vote for a tag, 'up' or 'down' vote. Send the same value again to undo a vote.
Parameters
t_name
requiredName of the tag (implicitly created, if doesn't exist)
vote
required'up' or 'down'
gallery
requiredGallery
id
requiredID of the gallery item
updateGalleryTags
Update the tags for a post in the gallery
Parameters
id
requiredID of the gallery item
tags
requiredThe name of the tags you wish to associate with a post. Can be passed as tags[]=funny&tags[]=cat or tags=funny,cat/td>
gallery
requiredGallery
search
Search the gallery with a given query string.
Parameters
page
optionalinteger - the data paging number
window
optionalChange the date range of the request if the sort is 'top', day | week | month | year | all, defaults to all.
sort
optionaltime | viral | top - defaults to time
random
Returns a random set of gallery images.
Parameters
page
optionalA page of random gallery images, from 0-50. Pages are regenerated every hour.
toGallery
Share an Album or Image to the Gallery.
Parameters
title
requiredThe title of the image. This is required.
topic
optionalTopic name
tags[]
optionalThe name of the tags you wish to associate with a post. Can be passed as tags[]=funny&tags[]=cat or tags=funny,cat
mature
optionalIf the post is mature, set this value to 1.
terms
optionalIf the user has not accepted our terms yet, this endpoint will return an error. To by-pass the terms in general simply set this value to 1.
gallery
requiredGallery
fromGallery
Remove an image from the gallery. You must be logged in as the owner of the item to do this action.
Parameters
gallery
requiredGallery
album
Get additional information about an album in the gallery.
Parameters
gallery
requiredGallery
image
Get additional information about an image in the gallery.
Parameters
gallery
requiredGallery
reporting
Report an Image in the gallery
Parameters
3
required4
required5
required1
requiredreason
optionalAn integer representing the reason for the report Value Description 1 Doesn't belong on Imgur 2 Spam 3 Abusive 4 Mature content not marked as mature 5 Pornography
2
required
votes
Get the vote information about an image
Parameters
gallery
requiredGallery
voting
Vote for an image, 'up' or 'down' vote. Send 'veto' to undo a vote.
Parameters
vote
requiredVote
gallery
requiredGallery
comments
Comment on an image in the gallery.
Parameters
sort
optionalbest | top | new - defaults to best
gallery
requiredGallery
comment
Information about a specific comment. This action also allows any of the additional actions provided in the Comment Endpoint.
Parameters
comment
requiredComment
gallery
requiredGallery
commentCreation
Create a comment for an image.
Parameters
comment
requiredThe text of the comment.
gallery
requiredGallery
commentReply
Reply to a comment that has been created for an image.
Parameters
comment
requiredThe text you want to use as the reply.
gallery
requiredGallery
commentReply
requiredCommentReply
commentIds
List all of the IDs for the comments on an image.
Parameters
gallery
requiredGallery
commentCount
The number of comments on an Image.
Parameters
gallery
requiredGallery
SEE ALSO
https://api.imgur.com/endpoints/gallery