Create, save or delete comments and discussion threads that are used alongside videos and drawings.
Comments can be submitted as standalone text or as part of a discussion thread. They can be tied to a particular user and/or a canvas drawing if desired. Or they can exist as anonymous comments without any associated drawings or thread. If created as part of a discussion thread, a parent_id and discussion_id is required. The parent_id identifes the comment that a new comment is replying to.
There are only two required parameters when submitting comments: 'video_id' which identifies the video the comment is about, and 'body' which is the comment itself. If a parent_id is supplied, the comment automatically becomes part of a discussion thread.
You can permanently remove comments by submitting a REST http delete request with the following parameters:
The three parameters are required and VidPrep will check that they match (the comment id matches the video id and user id). The comment won't be deleted if they don't match or if the authentication id doesn't match as owner of the video (obviously!).
Upon a successful delete, three values are returned: @items, @canvases and @captions. These allow for reloading the associated items to a video after deletion of a comment. The values can be returned as ruby variables or JSON data.
Not yet supported, but may be in the future.