1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Code generated by lexgen. DO NOT EDIT.
#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UnspeccedSearchPostsSkeletonParams {
/// Filter to posts by the given account. Handles are resolved to DID before query-time.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub author: Option<String>,
/// Optional pagination mechanism; may not necessarily allow scrolling through entire result set.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cursor: Option<String>,
/// Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
/// Filter to posts in the given language. Expected to be based on post language field, though server may override language detection.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub lang: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
/// Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub mentions: Option<String>,
/// Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.
pub q: String,
/// Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub since: Option<String>,
/// Specifies the ranking order of results.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub sort: Option<String>,
/// Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub tag: Vec<String>,
/// Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub until: Option<String>,
/// Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
/// DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub viewer: Option<String>,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UnspeccedSearchPostsSkeletonOutput {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cursor: Option<String>,
/// Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub hits_total: Option<i64>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub posts: Vec<crate::api::app::bsky::UnspeccedDefsSkeletonSearchPost>,
/// Extra fields not defined in the schema.
#[serde(flatten)]
pub extra: std::collections::HashMap<String, serde_json::Value>,
}
/// UnspeccedSearchPostsSkeleton — Backend Posts search, returns only skeleton
pub async fn unspecced_search_posts_skeleton(
client: &crate::xrpc::Client,
params: &UnspeccedSearchPostsSkeletonParams,
) -> Result<UnspeccedSearchPostsSkeletonOutput, crate::xrpc::Error> {
client
.query("app.bsky.unspecced.searchPostsSkeleton", params)
.await
}