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

Comment related actions.
Inheritance: EndpointBase, ICommentEndpoint
Afficher le fichier Open project: DamienDennehy/Imgur.API Class Usage Examples

Private Properties

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

Méthodes publiques

Méthode Description
CommentEndpoint ( IApiClient apiClient ) : System

Initializes a new instance of the CommentEndpoint class.

CreateCommentAsync ( string comment, string galleryItemId, string parentId = null ) : Task

Creates a new comment, returns the ID of the comment. OAuth authentication required.

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

Create a reply for the given comment, returns the ID of the comment. OAuth authentication required.

DeleteCommentAsync ( int commentId ) : Task

Delete a comment by the given id. OAuth authentication required.

GetCommentAsync ( int commentId ) : Task

Get information about a specific comment.

GetRepliesAsync ( int commentId ) : Task

Get the comment with all of the replies for the comment.

ReportCommentAsync ( int commentId, ReportReason reason ) : Task

Report a comment for being inappropriate. OAuth authentication required.

VoteCommentAsync ( int commentId, VoteOption vote ) : Task

Vote on a comment. OAuth authentication required.

Private Methods

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

Initializes a new instance of the CommentEndpoint class.

Method Details

CommentEndpoint() public méthode

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

CreateCommentAsync() public méthode

Creates a new comment, returns the ID of the comment. 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 CreateCommentAsync ( string comment, string galleryItemId, string parentId = null ) : Task
comment string The comment text, this is what will be displayed.
galleryItemId string The ID of the item in the gallery that you wish to comment on.
parentId string The ID of the parent comment, this is an alternative method to create a reply.
Résultat Task

CreateReplyAsync() public méthode

Create a reply for the given comment, returns the ID of the comment. 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 CreateReplyAsync ( string comment, string galleryItemId, string parentId ) : Task
comment string The comment text, this is what will be displayed.
galleryItemId string The ID of the item in the gallery that you wish to comment on.
parentId string The comment id that you are replying to.
Résultat Task

DeleteCommentAsync() public méthode

Delete a comment by the given id. 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 DeleteCommentAsync ( int commentId ) : Task
commentId int The comment id.
Résultat Task

GetCommentAsync() 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 GetCommentAsync ( int commentId ) : Task
commentId int The comment id.
Résultat Task

GetRepliesAsync() public méthode

Get the comment with all of the replies for the 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 GetRepliesAsync ( int commentId ) : Task
commentId int The comment id.
Résultat Task

ReportCommentAsync() public méthode

Report a comment for being inappropriate. 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 ReportCommentAsync ( int commentId, ReportReason reason ) : Task
commentId int The comment id.
reason ReportReason The reason why the comment is inappropriate.
Résultat Task

VoteCommentAsync() public méthode

Vote on a comment. 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 VoteCommentAsync ( int commentId, VoteOption vote ) : Task
commentId int The comment id.
vote VoteOption The vote.
Résultat Task