Skip to main content

args_api/endpoint/question/
update_answer.rs

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