args_api/endpoint/bug/
list_bugs.rs1use serde::{Deserialize, Serialize};
2
3use crate::{
4 endpoint::Endpoint,
5 resource::{bug::BugResource, common::Page},
6};
7
8pub struct ListBugs;
9
10impl Endpoint for ListBugs {
11 const PATH: &'static str = "/repository/{owner}/{repo}/bugs";
12 const METHOD: http::Method = http::Method::GET;
13
14 type Request = ListBugsRequest;
15 type Response = ListBugsResponse;
16}
17
18#[derive(ApiRequest, Debug, Default, Serialize, Deserialize)]
19pub struct ListBugsRequest {
20 #[serde(default, skip_serializing_if = "Option::is_none")]
21 pub cursor: Option<String>,
22 #[serde(default, skip_serializing_if = "Option::is_none")]
23 pub limit: Option<u32>,
24}
25
26pub type ListBugsResponse = Page<BugResource>;