aboutsummaryrefslogtreecommitdiff
path: root/mastodon
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/status.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/mastodon/status.go b/mastodon/status.go
index d6a9330..bce283f 100644
--- a/mastodon/status.go
+++ b/mastodon/status.go
@@ -329,3 +329,15 @@ func (c *Client) UploadMediaFromMultipartFileHeader(ctx context.Context, fh *mul
}
return &attachment, nil
}
+
+// GetTimelineDirect return statuses from direct timeline.
+func (c *Client) GetTimelineDirect(ctx context.Context, pg *Pagination) ([]*Status, error) {
+ params := url.Values{}
+
+ var statuses []*Status
+ err := c.doAPI(ctx, http.MethodGet, "/api/v1/timelines/direct", params, &statuses, pg)
+ if err != nil {
+ return nil, err
+ }
+ return statuses, nil
+}