A better Rust ATProto crate
at main 2.3 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: place.stream.live.getLiveUsers 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 jacquard_derive::IntoStatic 17)] 18#[builder(start_fn = new)] 19#[serde(rename_all = "camelCase")] 20pub struct GetLiveUsers { 21 #[serde(skip_serializing_if = "std::option::Option::is_none")] 22 pub before: std::option::Option<jacquard_common::types::string::Datetime>, 23 ///(default: 50, min: 1, max: 100) 24 #[serde(skip_serializing_if = "std::option::Option::is_none")] 25 pub limit: std::option::Option<i64>, 26} 27 28#[jacquard_derive::lexicon] 29#[derive( 30 serde::Serialize, 31 serde::Deserialize, 32 Debug, 33 Clone, 34 PartialEq, 35 Eq, 36 jacquard_derive::IntoStatic, 37 Default 38)] 39#[serde(rename_all = "camelCase")] 40pub struct GetLiveUsersOutput<'a> { 41 #[serde(skip_serializing_if = "std::option::Option::is_none")] 42 #[serde(borrow)] 43 pub streams: std::option::Option< 44 Vec<crate::place_stream::livestream::LivestreamView<'a>>, 45 >, 46} 47 48///Response type for 49///place.stream.live.getLiveUsers 50pub struct GetLiveUsersResponse; 51impl jacquard_common::xrpc::XrpcResp for GetLiveUsersResponse { 52 const NSID: &'static str = "place.stream.live.getLiveUsers"; 53 const ENCODING: &'static str = "application/json"; 54 type Output<'de> = GetLiveUsersOutput<'de>; 55 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 56} 57 58impl jacquard_common::xrpc::XrpcRequest for GetLiveUsers { 59 const NSID: &'static str = "place.stream.live.getLiveUsers"; 60 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 61 type Response = GetLiveUsersResponse; 62} 63 64///Endpoint type for 65///place.stream.live.getLiveUsers 66pub struct GetLiveUsersRequest; 67impl jacquard_common::xrpc::XrpcEndpoint for GetLiveUsersRequest { 68 const PATH: &'static str = "/xrpc/place.stream.live.getLiveUsers"; 69 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 70 type Request<'de> = GetLiveUsers; 71 type Response = GetLiveUsersResponse; 72}