atrium_api/app/bsky/feed/
get_feed.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `app.bsky.feed.getFeed` namespace.
3pub const NSID: &str = "app.bsky.feed.getFeed";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {
7    #[serde(skip_serializing_if = "core::option::Option::is_none")]
8    pub cursor: core::option::Option<String>,
9    pub feed: 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    UnknownFeed(Option<String>),
26}
27impl std::fmt::Display for Error {
28    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
29        match self {
30            Error::UnknownFeed(msg) => {
31                write!(_f, "UnknownFeed")?;
32                if let Some(msg) = msg {
33                    write!(_f, ": {msg}")?;
34                }
35            }
36        }
37        Ok(())
38    }
39}