File Comment Reactions

A FileCommentReaction is a reaction that is attached to a comment on a file.

Create File Comment Reaction

SDK Method

FileCommentReaction.Create();

Return Object

FileCommentReaction

Authorization Requirement

Available to all authenticated keys or sessions.

Method Arguments

ArgumentDescription
user_id
int64
User ID. Provide a value of 0 to operate the current session's user.
file_comment_id
int64
Required
ID of file comment to attach reaction to.
emoji
string
Required
Emoji to react with.

Example Request

using FilesCom.Models;

var parameters = new Dictionary<string, object>();
parameters.Add("file_comment_id", (Int64?) 1);
parameters.Add("emoji", "emoji");

try
{
    var fileCommentReaction = await FileCommentReaction.Create(parameters);
    // Operate on fileCommentReaction
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Delete File Comment Reaction

SDK Method

fileCommentReaction.Delete();

Return Object

No return value.

Authorization Requirement

Available to all authenticated keys or sessions.

Example Request

using FilesCom.Models;

try
{
    await fileCommentReaction.Delete();
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

The FileCommentReaction Object

Some of the methods above return a FileCommentReaction object. The attributes of this object are listed below.

AttributeDescription
id
int64
Reaction ID
emoji
string
Emoji used in the reaction.