A fork of https://github.com/teal-fm/piper
at main 32 lines 803 B view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package bsky 4 5// schema: app.bsky.feed.getPosts 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/xrpc" 11) 12 13// FeedGetPosts_Output is the output of a app.bsky.feed.getPosts call. 14type FeedGetPosts_Output struct { 15 Posts []*FeedDefs_PostView `json:"posts" cborgen:"posts"` 16} 17 18// FeedGetPosts calls the XRPC method "app.bsky.feed.getPosts". 19// 20// uris: List of post AT-URIs to return hydrated views for. 21func FeedGetPosts(ctx context.Context, c *xrpc.Client, uris []string) (*FeedGetPosts_Output, error) { 22 var out FeedGetPosts_Output 23 24 params := map[string]interface{}{ 25 "uris": uris, 26 } 27 if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getPosts", params, nil, &out); err != nil { 28 return nil, err 29 } 30 31 return &out, nil 32}