args_api/endpoint/question/
vote_comment.rs1use serde::{Deserialize, Serialize};
2
3use crate::{endpoint::Endpoint, resource::question::VoteResource};
4
5pub struct VoteComment;
6
7impl Endpoint for VoteComment {
8 const PATH: &'static str =
9 "/repository/{owner}/{repo}/question/{number}/comment/{comment_id}/vote";
10 const METHOD: http::Method = http::Method::POST;
11
12 type Request = VoteCommentRequest;
13 type Response = VoteCommentResponse;
14}
15
16#[derive(ApiRequest, Debug, Serialize, Deserialize)]
17pub struct VoteCommentRequest {
18 pub value: i16,
19}
20
21pub type VoteCommentResponse = VoteResource;