account.GetStatuses: ExcludeBoosts option
This commit is contained in:
parent
9585b1ce2e
commit
1cc330baf3
10
accounts.go
10
accounts.go
|
@ -141,9 +141,15 @@ func UpdateCurrentAccount(profile *Profile) (*Account, error) {
|
||||||
return &account, nil
|
return &account, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Account) GetStatuses(pg *Pagination) ([]*Status, error) {
|
func (a *Account) GetStatuses(excludeBoosts bool, pg *Pagination) ([]*Status, error) {
|
||||||
var statuses []*Status
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user