summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbaummarten <kuna@hollow.capital>2023-01-15 20:05:11 +0100
committerD. Scott Boggs <scott@tams.tech>2023-01-29 09:12:47 -0500
commitaf763423fc8c51be1535d667a6404d4a72f3bcee (patch)
treece5766ee00df0cb6b4922b0b03dd95aed943230c
parentc99ae7f28e21644aa05177c732b1d61035badcb2 (diff)
api/v1/instance/domain_blocks
-rw-r--r--entities/src/instance.rs13
-rw-r--r--src/mastodon.rs1
2 files changed, 14 insertions, 0 deletions
diff --git a/entities/src/instance.rs b/entities/src/instance.rs
index 3c742c4..82e1782 100644
--- a/entities/src/instance.rs
+++ b/entities/src/instance.rs
@@ -54,3 +54,16 @@ pub struct Rule {
/// The rule to be followed.
pub text: String,
}
+
+/// A struct containing info of an instance-level domain block.
+#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)]
+pub struct DomainBlock {
+ /// URI of the domain in question
+ pub domain: String,
+ /// Digest
+ pub digest: String,
+ /// Severity of the block
+ pub severity: String,
+ /// Admin's public comment.
+ pub comment: String,
+}
diff --git a/src/mastodon.rs b/src/mastodon.rs
index 70aac72..74a20dc 100644
--- a/src/mastodon.rs
+++ b/src/mastodon.rs
@@ -60,6 +60,7 @@ impl Mastodon {
(get) favourites: "favourites" => Status,
(get) blocks: "blocks" => Account,
(get) domain_blocks: "domain_blocks" => String,
+ (get) instance_domain_blocks: "instance/domain_blocks" => DomainBlock,
(get) follow_requests: "follow_requests" => Account,
(get) get_home_timeline: "timelines/home" => Status,
(get) get_emojis: "custom_emojis" => Emoji,