Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.box.androidsdk.content;
 
Represents the API of the comment endpoint on Box. This class can be used to generate request objects for each of the APIs exposed endpoints
 
public class BoxApiComment extends BoxApi {

    
Constructs a BoxApiComment with the provided BoxSession

Parameters:
session authenticated session to use with the BoxApiComment
    public BoxApiComment(BoxSession session) {
        super(session);
    }
    public static final String COMMENTS_ENDPOINT = "/comments";
    protected String getCommentsUrl() { return getBaseUri() + ; }
    protected String getCommentInfoUrl(String id) { return String.format("%s/%s"getCommentsUrl(), id); }

    
Gets a request that retrieves information on a comment

Parameters:
id id of comment to retrieve info on
Returns:
request to get a comment's information
        return request;
    }

    
Gets a request that adds a reply comment to a comment

Parameters:
commentId id of the comment to reply to
message message for the comment that will be added
Returns:
request to add a reply comment to a comment
        BoxRequestsComment.AddReplyComment request = new BoxRequestsComment.AddReplyComment(commentIdmessagegetCommentsUrl(), );
        return request;
    }

    
Gets a request that updates a comment's information

Parameters:
id id of comment to update information on
newMessage new message for the comment
Returns:
request to update a comment's information
    public BoxRequestsComment.UpdateComment getUpdateRequest(String idString newMessage) {
        BoxRequestsComment.UpdateComment request = new BoxRequestsComment.UpdateComment(idnewMessagegetCommentInfoUrl(id), );
        return request;
    }

    
Gets a request that deletes a comment

Parameters:
id id of comment to delete
Returns:
request to delete a comment
        return request;
    }
New to GrepCode? Check out our FAQ X