package com.uwetrottmann.trakt.v2.services;

import com.uwetrottmann.trakt.v2.annotations.DELETE;
import com.uwetrottmann.trakt.v2.entities.Comment;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
import retrofit.http.Path;

public interface Comments {

    /**
     * <b>OAuth Required</b>
     *
     * <p> Add a new comment to a movie, show, episode, or list. If you add a review, it needs to be at least 200 words.
     * Also make sure to allow and encourage spoilers to be indicated in your app.
     *
     * @param comment A {@link com.uwetrottmann.trakt.v2.entities.Comment} with either a movie, show or episode set,
     * plus comment and spoiler or review flags.
     */
    @POST("/comments")
    Comment post(
            @Body Comment comment
    );

    /**
     * <b>OAuth Required</b>
     *
     * <p> Returns a single comment and indicates how many replies it has. Use GET /comments/:id/replies to get the
     * actual replies.
     *
     * @param id A specific comment ID. Example: 417.
     */
    @GET("/comments/{id}")
    Comment get(
            @Path("id") int id
    );

    /**
     * <b>OAuth Required</b>
     *
     * <p> Update a single comment created within the last hour. The OAuth user must match the author of the comment in
     * order to update it.
     *
     * @param id A specific comment ID. Example: 417.
     * @param comment A {@link com.uwetrottmann.trakt.v2.entities.Comment} with comment and spoiler or review flags.
     */
    @POST("/comments/{id}")
    Comment update(
            @Path("id") int id,
            @Body Comment comment
    );

    /**
     * <b>OAuth Required</b>
     *
     * <p> Delete a single comment created within the last hour. This also effectively removes any replies this comment
     * has. The OAuth user must match the author of the comment in order to delete it.
     *
     * @param id A specific comment ID. Example: 417.
     */
    @DELETE("/comments/{id}")
    Comment delete(
            @Path("id") int id
    );

}

@@ -250,16 +250,40 @@
 .Path;%0A%0A
+import java.util.List;%0A%0A
 public i
@@ -2058,10 +2058,929 @@
     );%0A%0A
+    /**%0A     * %3Cb%3EOAuth Required%3C/b%3E%0A     *%0A     * %3Cp%3E Returns all replies for a comment. It is possible these replies could have replies themselves, so in that%0A     * case you would just call GET /comment/:id/replies again with the new comment_id.%0A     *%0A     * @param id A specific comment ID. Example: 417.%0A     */%0A    @GET(%22/comments/%7Bid%7D/replies%22)%0A    List%3CComment%3E getReplies(%0A            @Path(%22id%22) int id%0A    );%0A%0A    /**%0A     * %3Cb%3EOAuth Required%3C/b%3E%0A     *%0A     * %3Cp%3E Add a new reply to an existing comment. Also make sure to allow and encourage spoilers to be indicated in%0A     * your app.%0A     *%0A     * @param id A specific comment ID. Example: 417.%0A     * @param comment A %7B@link com.uwetrottmann.trakt.v2.entities.Comment%7D with comment and spoiler or review flags.%0A     */%0A    @POST(%22/comments/%7Bid%7D/replies%22)%0A    Comment postReply(%0A            @Path(%22id%22) int id,%0A            @Body Comment comment%0A    );%0A%0A
 %7D%0A

Support `/comments/{id}/replies`.