-
Notifications
You must be signed in to change notification settings - Fork 86
/
feedgetTimeline.go
35 lines (27 loc) · 1.07 KB
/
feedgetTimeline.go
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
// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
package bsky
// schema: app.bsky.feed.getTimeline
import (
"context"
"github.com/bluesky-social/indigo/xrpc"
)
// FeedGetTimeline_Output is the output of a app.bsky.feed.getTimeline call.
type FeedGetTimeline_Output struct {
Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
Feed []*FeedDefs_FeedViewPost `json:"feed" cborgen:"feed"`
}
// FeedGetTimeline calls the XRPC method "app.bsky.feed.getTimeline".
//
// algorithm: Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism.
func FeedGetTimeline(ctx context.Context, c *xrpc.Client, algorithm string, cursor string, limit int64) (*FeedGetTimeline_Output, error) {
var out FeedGetTimeline_Output
params := map[string]interface{}{
"algorithm": algorithm,
"cursor": cursor,
"limit": limit,
}
if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getTimeline", params, nil, &out); err != nil {
return nil, err
}
return &out, nil
}