1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: app.bsky.feed.getTimeline
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[derive(
9 serde::Serialize,
10 serde::Deserialize,
11 Debug,
12 Clone,
13 PartialEq,
14 Eq,
15 bon::Builder
16)]
17#[builder(start_fn = new)]
18#[serde(rename_all = "camelCase")]
19pub struct GetTimeline<'a> {
20 #[serde(skip_serializing_if = "std::option::Option::is_none")]
21 #[serde(borrow)]
22 #[builder(into)]
23 pub algorithm: std::option::Option<jacquard_common::CowStr<'a>>,
24 #[serde(skip_serializing_if = "std::option::Option::is_none")]
25 #[serde(borrow)]
26 #[builder(into)]
27 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
28 ///(default: 50, min: 1, max: 100)
29 #[serde(skip_serializing_if = "std::option::Option::is_none")]
30 pub limit: std::option::Option<i64>,
31}
32
33impl jacquard_common::IntoStatic for GetTimeline<'_> {
34 type Output = GetTimeline<'static>;
35 fn into_static(self) -> Self::Output {
36 GetTimeline {
37 algorithm: self.algorithm.into_static(),
38 cursor: self.cursor.into_static(),
39 limit: self.limit.into_static(),
40 }
41 }
42}
43
44#[jacquard_derive::lexicon]
45#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
46#[serde(rename_all = "camelCase")]
47pub struct GetTimelineOutput<'a> {
48 #[serde(skip_serializing_if = "std::option::Option::is_none")]
49 #[serde(borrow)]
50 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
51 #[serde(borrow)]
52 pub feed: Vec<crate::app_bsky::feed::FeedViewPost<'a>>,
53}
54
55impl jacquard_common::IntoStatic for GetTimelineOutput<'_> {
56 type Output = GetTimelineOutput<'static>;
57 fn into_static(self) -> Self::Output {
58 GetTimelineOutput {
59 cursor: self.cursor.into_static(),
60 feed: self.feed.into_static(),
61 extra_data: self.extra_data.into_static(),
62 }
63 }
64}
65
66impl jacquard_common::types::xrpc::XrpcRequest for GetTimeline<'_> {
67 const NSID: &'static str = "app.bsky.feed.getTimeline";
68 const METHOD: jacquard_common::types::xrpc::XrpcMethod = jacquard_common::types::xrpc::XrpcMethod::Query;
69 const OUTPUT_ENCODING: &'static str = "application/json";
70 type Output<'de> = GetTimelineOutput<'de>;
71 type Err<'de> = jacquard_common::types::xrpc::GenericError<'de>;
72}