misskey_api/endpoint/notes/
show.rs1use crate::model::{id::Id, note::Note};
2
3use serde::Serialize;
4
5#[derive(Serialize, Debug, Clone)]
6#[serde(rename_all = "camelCase")]
7pub struct Request {
8 pub note_id: Id<Note>,
9}
10
11impl misskey_core::Request for Request {
12 type Response = Note;
13 const ENDPOINT: &'static str = "notes/show";
14}
15
16#[cfg(test)]
17mod tests {
18 use super::Request;
19 use crate::test::{ClientExt, TestClient};
20
21 #[tokio::test]
22 async fn request() {
23 let client = TestClient::new();
24 let note = client.create_note(Some("test"), None, None).await;
25
26 client.test(Request { note_id: note.id }).await;
27 }
28}