aboutsummaryrefslogtreecommitdiff
path: root/mastodon
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-01-31 03:38:49 +0000
committerr <r@freesoftwareextremist.com>2020-01-31 03:38:49 +0000
commita981085260af2623bd4988e4b9c0052e2e3035eb (patch)
tree8b1f2f35274a2e5fee77f2498f0b7569dca18b7e /mastodon
parent6a6cc744b7d9ed1b57dc2e88cd22e73275d5dcbe (diff)
downloadbloat-a981085260af2623bd4988e4b9c0052e2e3035eb.tar.gz
bloat-a981085260af2623bd4988e4b9c0052e2e3035eb.zip
Update user page
- Use the same page to display status and user list - Add media only status list
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/accounts.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/mastodon/accounts.go b/mastodon/accounts.go
index 8cee6bb..86581ec 100644
--- a/mastodon/accounts.go
+++ b/mastodon/accounts.go
@@ -133,9 +133,11 @@ func (c *Client) AccountUpdate(ctx context.Context, profile *Profile) (*Account,
}
// GetAccountStatuses return statuses by specified accuont.
-func (c *Client) GetAccountStatuses(ctx context.Context, id string, pg *Pagination) ([]*Status, error) {
+func (c *Client) GetAccountStatuses(ctx context.Context, id string, onlyMedia bool, pg *Pagination) ([]*Status, error) {
var statuses []*Status
- err := c.doAPI(ctx, http.MethodGet, fmt.Sprintf("/api/v1/accounts/%s/statuses", url.PathEscape(string(id))), nil, &statuses, pg)
+ params := url.Values{}
+ params.Set("only_media", strconv.FormatBool(onlyMedia))
+ err := c.doAPI(ctx, http.MethodGet, fmt.Sprintf("/api/v1/accounts/%s/statuses", url.PathEscape(string(id))), params, &statuses, pg)
if err != nil {
return nil, err
}