C# Class Imgur.API.Endpoints.Impl.GalleryEndpoint

Afficher le fichier Open project: DamienDennehy/Imgur.API Class Usage Examples

Private Properties

Свойство Type Description
GalleryEndpoint System

Méthodes publiques

Méthode Description
CreateGalleryItemCommentAsync ( string comment, string galleryItemId ) : Task

Create a comment for an item. OAuth authentication required.

CreateGalleryItemCommentReplyAsync ( string comment, string galleryItemId, string parentId ) : Task

Reply to a comment that has been created for an item. OAuth authentication required.

GalleryEndpoint ( IApiClient apiClient ) : System

Initializes a new instance of the GalleryEndpoint class.

GetGalleryAlbumAsync ( string albumId ) : Task

Get additional information about an album in the gallery.

GetGalleryAsync ( GallerySection section = GallerySection.Hot, GallerySortOrder sort = GallerySortOrder.Viral, TimeWindow window = TimeWindow.Day, int page = null, bool showViral = true ) : Task>

Returns the images in the gallery.

GetGalleryImageAsync ( string imageId ) : Task

Get additional information about an image in the gallery.

GetGalleryItemCommentAsync ( int commentId, string galleryItemId ) : Task

Get information about a specific comment.

GetGalleryItemCommentCountAsync ( string galleryItemId ) : Task

The number of comments on an item.

GetGalleryItemCommentIdsAsync ( string galleryItemId ) : Task>

List all of the IDs for the comments on an item.

GetGalleryItemCommentsAsync ( string galleryItemId, CommentSortOrder sort = CommentSortOrder.Best ) : Task>

Get all comments for a gallery item.

GetGalleryItemTagsAsync ( string galleryItemId ) : Task

View tags for a gallery item.

GetGalleryItemVotesAsync ( string galleryItemId ) : Task

Get the vote information about an image.

GetGalleryTagAsync ( string tag, GalleryTagSortOrder sort = GalleryTagSortOrder.Viral, TimeWindow window = TimeWindow.Week, int page = null ) : Task

View images for a gallery tag.

GetGalleryTagImageAsync ( string galleryItemId, string tag ) : Task

View a single item in a gallery tag.

GetMemesSubGalleryAsync ( MemesGallerySortOrder sort = MemesGallerySortOrder.Viral, TimeWindow window = TimeWindow.Week, int page = null ) : Task>

View images for memes subgallery.

GetMemesSubGalleryImageAsync ( string imageId ) : Task

View a single image in the memes gallery.

GetRandomGalleryAsync ( int page = null ) : Task>

Returns a random set of gallery images.

GetSubredditGalleryAsync ( string subreddit, SubredditGallerySortOrder sort = SubredditGallerySortOrder.Time, TimeWindow window = TimeWindow.Week, int page = null ) : Task>

View gallery images for a subreddit.

GetSubredditImageAsync ( string imageId, string subreddit ) : Task

View a single image in the subreddit.

PublishToGalleryAsync ( string galleryItemId, string title, string topicId = null, bool bypassTerms = null, bool mature = null ) : Task

Share an Album or Image to the Gallery. OAuth authentication required.

RemoveFromGalleryAsync ( string galleryItemId ) : Task

Remove an item from the gallery. OAuth authentication required.

ReportGalleryItemAsync ( string galleryItemId, ReportReason reason ) : Task

Report an item in the gallery. OAuth authentication required.

SearchGalleryAdvancedAsync ( string qAll = null, string qAny = null, string qExactly = null, string qNot = null, ImageFileType fileType = null, ImageSize imageSize = null, GallerySortOrder sort = GallerySortOrder.Time, TimeWindow window = TimeWindow.All, int page = null ) : Task>

Search the gallery with a given query string.

SearchGalleryAsync ( string query, GallerySortOrder sort = GallerySortOrder.Time, TimeWindow window = TimeWindow.All, int page = null ) : Task>

Search the gallery with a given query string.

VoteGalleryItemAsync ( string galleryItemId, VoteOption vote ) : Task

Vote for an item. Send the same value again to undo a vote. OAuth authentication required.

VoteGalleryTagAsync ( string galleryItemId, string tag, VoteOption vote ) : Task

Vote for a tag. Send the same value again to undo a vote. OAuth authentication required.

Private Methods

Méthode Description
GalleryEndpoint ( IApiClient apiClient, HttpClient httpClient ) : System

Initializes a new instance of the GalleryEndpoint class.

Method Details

CreateGalleryItemCommentAsync() public méthode

Create a comment for an item. OAuth authentication required.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public CreateGalleryItemCommentAsync ( string comment, string galleryItemId ) : Task
comment string The text of the comment.
galleryItemId string The gallery item id.
Résultat Task

CreateGalleryItemCommentReplyAsync() public méthode

Reply to a comment that has been created for an item. OAuth authentication required.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public CreateGalleryItemCommentReplyAsync ( string comment, string galleryItemId, string parentId ) : Task
comment string The text of the comment.
galleryItemId string The gallery item id.
parentId string The comment id that you are replying to.
Résultat Task

GalleryEndpoint() public méthode

Initializes a new instance of the GalleryEndpoint class.
public GalleryEndpoint ( IApiClient apiClient ) : System
apiClient IApiClient The type of client that will be used for authentication.
Résultat System

GetGalleryAlbumAsync() public méthode

Get additional information about an album in the gallery.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetGalleryAlbumAsync ( string albumId ) : Task
albumId string The album id.
Résultat Task

GetGalleryAsync() public méthode

Returns the images in the gallery.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetGalleryAsync ( GallerySection section = GallerySection.Hot, GallerySortOrder sort = GallerySortOrder.Viral, TimeWindow window = TimeWindow.Day, int page = null, bool showViral = true ) : Task>
section GallerySection The gallery section. Default: Hot
sort GallerySortOrder The order that the gallery should be sorted by. Default: Viral
window TimeWindow The time period that should be used in filtering requests. Default: Day
page int The data paging number. Default: null
showViral bool Show or hide viral images from the 'user' section. Default: true
Résultat Task>

GetGalleryImageAsync() public méthode

Get additional information about an image in the gallery.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetGalleryImageAsync ( string imageId ) : Task
imageId string The image id.
Résultat Task

GetGalleryItemCommentAsync() public méthode

Get information about a specific comment.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetGalleryItemCommentAsync ( int commentId, string galleryItemId ) : Task
commentId int The comment id.
galleryItemId string The gallery item id.
Résultat Task

GetGalleryItemCommentCountAsync() public méthode

The number of comments on an item.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetGalleryItemCommentCountAsync ( string galleryItemId ) : Task
galleryItemId string The gallery item id.
Résultat Task

GetGalleryItemCommentIdsAsync() public méthode

List all of the IDs for the comments on an item.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetGalleryItemCommentIdsAsync ( string galleryItemId ) : Task>
galleryItemId string The gallery item id.
Résultat Task>

GetGalleryItemCommentsAsync() public méthode

Get all comments for a gallery item.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetGalleryItemCommentsAsync ( string galleryItemId, CommentSortOrder sort = CommentSortOrder.Best ) : Task>
galleryItemId string The gallery item id.
sort CommentSortOrder The order that comments should be sorted by.
Résultat Task>

GetGalleryItemTagsAsync() public méthode

View tags for a gallery item.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetGalleryItemTagsAsync ( string galleryItemId ) : Task
galleryItemId string The gallery item id.
Résultat Task

GetGalleryItemVotesAsync() public méthode

Get the vote information about an image.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetGalleryItemVotesAsync ( string galleryItemId ) : Task
galleryItemId string The gallery item id.
Résultat Task

GetGalleryTagAsync() public méthode

View images for a gallery tag.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetGalleryTagAsync ( string tag, GalleryTagSortOrder sort = GalleryTagSortOrder.Viral, TimeWindow window = TimeWindow.Week, int page = null ) : Task
tag string The name of the tag.
sort GalleryTagSortOrder The order that the images in the gallery tag should be sorted by. Default: Viral
window TimeWindow The time period that should be used in filtering requests. Default: Week
page int The data paging number. Default: null
Résultat Task

GetGalleryTagImageAsync() public méthode

View a single item in a gallery tag.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetGalleryTagImageAsync ( string galleryItemId, string tag ) : Task
galleryItemId string The gallery item id.
tag string The name of the tag.
Résultat Task

GetMemesSubGalleryAsync() public méthode

View images for memes subgallery.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetMemesSubGalleryAsync ( MemesGallerySortOrder sort = MemesGallerySortOrder.Viral, TimeWindow window = TimeWindow.Week, int page = null ) : Task>
sort MemesGallerySortOrder The order that the gallery should be sorted by. Default: Viral
window TimeWindow The time period that should be used in filtering requests. Default: Week
page int The data paging number. Default: null
Résultat Task>

GetMemesSubGalleryImageAsync() public méthode

View a single image in the memes gallery.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetMemesSubGalleryImageAsync ( string imageId ) : Task
imageId string The image id.
Résultat Task

GetRandomGalleryAsync() public méthode

Returns a random set of gallery images.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetRandomGalleryAsync ( int page = null ) : Task>
page int A page of random gallery images, from 0-50. Pages are regenerated every hour.
Résultat Task>

GetSubredditGalleryAsync() public méthode

View gallery images for a subreddit.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetSubredditGalleryAsync ( string subreddit, SubredditGallerySortOrder sort = SubredditGallerySortOrder.Time, TimeWindow window = TimeWindow.Week, int page = null ) : Task>
subreddit string A valid subreddit name. Example: pics, gaming
sort SubredditGallerySortOrder The order that the gallery should be sorted by. Default: Time
window TimeWindow The time period that should be used in filtering requests. Default: Week
page int The data paging number. Default: null
Résultat Task>

GetSubredditImageAsync() public méthode

View a single image in the subreddit.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public GetSubredditImageAsync ( string imageId, string subreddit ) : Task
imageId string The image id.
subreddit string A valid subreddit name. Example: pics, gaming
Résultat Task

PublishToGalleryAsync() public méthode

Share an Album or Image to the Gallery. OAuth authentication required.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public PublishToGalleryAsync ( string galleryItemId, string title, string topicId = null, bool bypassTerms = null, bool mature = null ) : Task
galleryItemId string The gallery item id.
title string The title of the image. This is required.
topicId string The topic id - not the topic name.
bypassTerms bool /// If the user has not accepted the terms yet, this endpoint will return an error. To by-pass /// the terms in general simply set this value to true. ///
mature bool If the post is mature, set this value to true.
Résultat Task

RemoveFromGalleryAsync() public méthode

Remove an item from the gallery. OAuth authentication required.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public RemoveFromGalleryAsync ( string galleryItemId ) : Task
galleryItemId string The gallery item id.
Résultat Task

ReportGalleryItemAsync() public méthode

Report an item in the gallery. OAuth authentication required.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public ReportGalleryItemAsync ( string galleryItemId, ReportReason reason ) : Task
galleryItemId string The gallery item id.
reason ReportReason A reason why content is inappropriate.
Résultat Task

SearchGalleryAdvancedAsync() public méthode

Search the gallery with a given query string.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public SearchGalleryAdvancedAsync ( string qAll = null, string qAny = null, string qExactly = null, string qNot = null, ImageFileType fileType = null, ImageSize imageSize = null, GallerySortOrder sort = GallerySortOrder.Time, TimeWindow window = TimeWindow.All, int page = null ) : Task>
qAll string Search for all of these words (and).
qAny string Search for any of these words (or).
qExactly string Search for exactly this word or phrase.
qNot string Exclude results matching this word or phrase.
fileType ImageFileType Show results for a specific file type.
imageSize ImageSize Show results for a specific image size.
sort GallerySortOrder The order that the gallery should be sorted by. Default: Time
window TimeWindow The time period that should be used in filtering requests. Default: Day
page int The data paging number. Default: null
Résultat Task>

SearchGalleryAsync() public méthode

Search the gallery with a given query string.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public SearchGalleryAsync ( string query, GallerySortOrder sort = GallerySortOrder.Time, TimeWindow window = TimeWindow.All, int page = null ) : Task>
query string /// Query string to search by. This parameter also supports boolean operators (AND, OR, NOT) and /// indices (tag: user: title: ext: subreddit: album: meme:). An example compound query would be 'title: cats AND dogs /// ext: gif' ///
sort GallerySortOrder The order that the gallery should be sorted by. Default: Time
window TimeWindow The time period that should be used in filtering requests. Default: Day
page int The data paging number. Default: null
Résultat Task>

VoteGalleryItemAsync() public méthode

Vote for an item. Send the same value again to undo a vote. OAuth authentication required.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public VoteGalleryItemAsync ( string galleryItemId, VoteOption vote ) : Task
galleryItemId string The gallery item id.
vote VoteOption The vote.
Résultat Task

VoteGalleryTagAsync() public méthode

Vote for a tag. Send the same value again to undo a vote. OAuth authentication required.
/// Thrown when a null reference is passed to a method that does not accept it as a /// valid argument. /// Thrown when an error is found in a response from an Imgur endpoint. Thrown when an error is found in a response from a Mashape endpoint.
public VoteGalleryTagAsync ( string galleryItemId, string tag, VoteOption vote ) : Task
galleryItemId string The gallery item id.
tag string Name of the tag (implicitly created, if doesn't exist).
vote VoteOption The vote.
Résultat Task