1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
2
3package bsky
4
5// schema: app.bsky.feed.getTimeline
6
7import (
8 "context"
9
10 "github.com/bluesky-social/indigo/lex/util"
11)
12
13// FeedGetTimeline_Output is the output of a app.bsky.feed.getTimeline call.
14type FeedGetTimeline_Output struct {
15 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
16 Feed []*FeedDefs_FeedViewPost `json:"feed" cborgen:"feed"`
17}
18
19// FeedGetTimeline calls the XRPC method "app.bsky.feed.getTimeline".
20//
21// algorithm: Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism.
22func FeedGetTimeline(ctx context.Context, c util.LexClient, algorithm string, cursor string, limit int64) (*FeedGetTimeline_Output, error) {
23 var out FeedGetTimeline_Output
24
25 params := map[string]interface{}{}
26 if algorithm != "" {
27 params["algorithm"] = algorithm
28 }
29 if cursor != "" {
30 params["cursor"] = cursor
31 }
32 if limit != 0 {
33 params["limit"] = limit
34 }
35 if err := c.LexDo(ctx, util.Query, "", "app.bsky.feed.getTimeline", params, nil, &out); err != nil {
36 return nil, err
37 }
38
39 return &out, nil
40}