// Path: src/main/java/com/scorpiac/javarant/responses/CommentResponse.java
// public class CommentResponse extends Response<Comment> {
//     @JsonProperty
//     void setComment(Comment comment) {
//         value = comment;
//     }
// }
// 
// Path: src/main/java/com/scorpiac/javarant/responses/RantResponse.java
// public class RantResponse extends Response<Rant> {
//     @JsonProperty
//     void setRant(Rant rant) {
//         value = rant;
//     }
// }


import com.scorpiac.javarant.responses.CommentResponse;
import com.scorpiac.javarant.responses.RantResponse;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import java.util.List;
package com.scorpiac.javarant;



public class DevRantAuth {
    private final DevRant devRant;

    DevRantAuth(DevRant devRant) {
        this.devRant = devRant;
    }

    /**
     * Vote on a rant.
     *
     * @param id   The rant to vote on.
     * @param vote The vote to cast.
     * @return The rant.
     */
    public Rant voteRant(int id, Vote vote) {
        return devRant.getRequestHandler().post(
                ApiEndpoint.RANTS.toString() + '/' + id + '/' + ApiEndpoint.VOTE.toString(),
                RantResponse.class,
                getParameters(vote.getOptions())
        ).getValueOrError();
    }

    /**
     * Vote on a comment.
     *
     * @param id   The comment to vote on.
     * @param vote The vote to cast.
     * @return The comment.
     */
    public Comment voteComment(int id, Vote vote) {
        return devRant.getRequestHandler().post(
                ApiEndpoint.COMMENTS.toString() + '/' + id + '/' + ApiEndpoint.VOTE.toString(),
// Path: src/main/java/com/scorpiac/javarant/responses/CommentResponse.java
// public class CommentResponse extends Response<Comment> {
//     @JsonProperty
//     void setComment(Comment comment) {
//         value = comment;
//     }
// }
// 
// Path: src/main/java/com/scorpiac/javarant/responses/RantResponse.java
// public class RantResponse extends Response<Rant> {
//     @JsonProperty
//     void setRant(Rant rant) {
//         value = rant;
//     }
// }


// Path: src/main/java/com/scorpiac/javarant/DevRantAuth.java
import com.scorpiac.javarant.responses.CommentResponse;
import com.scorpiac.javarant.responses.RantResponse;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import java.util.List;

package com.scorpiac.javarant;



public class DevRantAuth {
    private final DevRant devRant;

    DevRantAuth(DevRant devRant) {
        this.devRant = devRant;
    }

    /**
     * Vote on a rant.
     *
     * @param id   The rant to vote on.
     * @param vote The vote to cast.
     * @return The rant.
     */
    public Rant voteRant(int id, Vote vote) {
        return devRant.getRequestHandler().post(
                ApiEndpoint.RANTS.toString() + '/' + id + '/' + ApiEndpoint.VOTE.toString(),
                RantResponse.class,
                getParameters(vote.getOptions())
        ).getValueOrError();
    }

    /**
     * Vote on a comment.
     *
     * @param id   The comment to vote on.
     * @param vote The vote to cast.
     * @return The comment.
     */
    public Comment voteComment(int id, Vote vote) {
        return devRant.getRequestHandler().post(
                ApiEndpoint.COMMENTS.toString() + '/' + id + '/' + ApiEndpoint.VOTE.toString(),
                CommentResponse.class,