Skip to main content

atrium_api/app/bsky/feed/
get_actor_likes.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `app.bsky.feed.getActorLikes` namespace.
3pub const NSID: &str = "app.bsky.feed.getActorLikes";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {
7    pub actor: crate::types::string::AtIdentifier,
8    #[serde(skip_serializing_if = "core::option::Option::is_none")]
9    pub cursor: core::option::Option<String>,
10    #[serde(skip_serializing_if = "core::option::Option::is_none")]
11    pub limit: core::option::Option<crate::types::LimitedNonZeroU8<100u8>>,
12}
13pub type Parameters = crate::types::Object<ParametersData>;
14#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
15#[serde(rename_all = "camelCase")]
16pub struct OutputData {
17    #[serde(skip_serializing_if = "core::option::Option::is_none")]
18    pub cursor: core::option::Option<String>,
19    pub feed: Vec<crate::app::bsky::feed::defs::FeedViewPost>,
20}
21pub type Output = crate::types::Object<OutputData>;
22#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
23#[serde(tag = "error", content = "message")]
24pub enum Error {
25    BlockedActor(Option<String>),
26    BlockedByActor(Option<String>),
27}
28impl std::fmt::Display for Error {
29    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
30        match self {
31            Error::BlockedActor(msg) => {
32                write!(_f, "BlockedActor")?;
33                if let Some(msg) = msg {
34                    write!(_f, ": {msg}")?;
35                }
36            }
37            Error::BlockedByActor(msg) => {
38                write!(_f, "BlockedByActor")?;
39                if let Some(msg) = msg {
40                    write!(_f, ": {msg}")?;
41                }
42            }
43        }
44        Ok(())
45    }
46}