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

Comment related actions.
Inheritance: EndpointBase, ICommentEndpoint
ファイルを表示 Open project: DamienDennehy/Imgur.API Class Usage Examples

Private Properties

Property Type Description
CommentEndpoint System

Public Methods

Method 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

Method Description
CommentEndpoint ( IApiClient apiClient, HttpClient httpClient ) : System

Initializes a new instance of the CommentEndpoint class.

Method Details

CommentEndpoint() public method

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.
return System

CreateCommentAsync() public method

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.
return Task

CreateReplyAsync() public method

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.
return Task

DeleteCommentAsync() public method

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.
return Task

GetCommentAsync() public method

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.
return Task

GetRepliesAsync() public method

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.
return Task

ReportCommentAsync() public method

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.
return Task

VoteCommentAsync() public method

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.
return Task