File Comment Reactions

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

Create File Comment Reaction

SDK Function

FileCommentReaction.create()

Return Object

FileCommentReaction

Authorization Requirement

Available to all authenticated keys or sessions.

Function 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

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.FileCommentReaction;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  parameters.put("file_comment_id", 1);
  parameters.put("emoji", "emoji");
  
  FileCommentReaction fileCommentReaction = FileCommentReaction.create(parameters);
  // Operate on fileCommentReaction
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Delete File Comment Reaction

SDK Function

fileCommentReaction.delete();

Return Object

No return value.

Authorization Requirement

Available to all authenticated keys or sessions.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.FileCommentReaction;

try {
  HashMap<String, Object> attributes = new HashMap<>();
  FileCommentReaction fileCommentReaction = new FileCommentReaction(attributes);
  fileCommentReaction.delete(null);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

The FileCommentReaction Object

Some of the functions 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.