From 1cc330baf3e9bfc732afafa6359e303ed7721919 Mon Sep 17 00:00:00 2001 From: gutmet Date: Wed, 23 Nov 2022 20:51:56 +0100 Subject: [PATCH] account.GetStatuses: ExcludeBoosts option --- accounts.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/accounts.go b/accounts.go index 9fce5c3..36caf29 100644 --- a/accounts.go +++ b/accounts.go @@ -141,9 +141,15 @@ func UpdateCurrentAccount(profile *Profile) (*Account, error) { return &account, nil } -func (a *Account) GetStatuses(pg *Pagination) ([]*Status, error) { +func (a *Account) GetStatuses(excludeBoosts bool, pg *Pagination) ([]*Status, error) { var statuses []*Status - err := doAPI(http.MethodGet, fmt.Sprintf("/api/v1/accounts/%s/statuses", url.PathEscape(a.GetID())), nil, &statuses, pg) + var params url.Values + params = nil + if excludeBoosts { + params = url.Values{} + params.Set("exclude_reblogs", "true") + } + err := doAPI(http.MethodGet, fmt.Sprintf("/api/v1/accounts/%s/statuses", url.PathEscape(a.GetID())), params, &statuses, pg) if err != nil { return nil, err }