1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use ruma_api_macros::ruma_api;
use serde::{Deserialize, Serialize};
ruma_api! {
metadata {
description: "Adds contact information to the user's account.",
method: POST,
name: "create_contact",
path: "/_matrix/client/r0/account/3pid",
rate_limited: false,
requires_authentication: true,
}
request {
#[serde(skip_serializing_if = "Option::is_none")]
pub bind: Option<bool>,
pub three_pid_creds: ThreePidCredentials,
}
response {}
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ThreePidCredentials {
pub client_secret: String,
pub id_server: String,
pub sid: String,
}