misskey_api/endpoint/notes/reactions/
delete.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 = ();
13 const ENDPOINT: &'static str = "notes/reactions/delete";
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 use crate::model::note::Reaction;
24
25 let client = TestClient::new();
26 let note = client.admin.create_note(Some("test"), None, None).await;
27
28 client
29 .user
30 .test(crate::endpoint::notes::reactions::create::Request {
31 note_id: note.id.clone(),
32 reaction: Reaction("👍".to_string()),
33 })
34 .await;
35
36 client.user.test(Request { note_id: note.id }).await;
37 }
38}