Skip to main content

args_api/endpoint/question/
create_answer_comment.rs

1use serde::{Deserialize, Serialize};
2
3use crate::{endpoint::Endpoint, resource::question::CommentResource};
4
5pub struct CreateAnswerComment;
6
7impl Endpoint for CreateAnswerComment {
8    const PATH: &'static str =
9        "/repository/{owner}/{repo}/question/{number}/answer/{answer_id}/comment";
10    const METHOD: http::Method = http::Method::POST;
11
12    type Request = CreateAnswerCommentRequest;
13    type Response = CreateAnswerCommentResponse;
14}
15
16#[derive(ApiRequest, Debug, Serialize, Deserialize)]
17pub struct CreateAnswerCommentRequest {
18    pub body: String,
19}
20
21pub type CreateAnswerCommentResponse = CommentResource;