This commit is contained in:
Yasuhiro Matsumoto 2017-10-25 15:22:17 +09:00
parent e0cf1e0650
commit aef736e991
8 changed files with 58 additions and 57 deletions

View file

@ -2,7 +2,6 @@ package mastodon
import (
"context"
"fmt"
"net/http"
"net/url"
)
@ -24,11 +23,11 @@ func (c *Client) GetReports(ctx context.Context) ([]*Report, error) {
}
// Report reports the report
func (c *Client) Report(ctx context.Context, accountID int64, ids []int64, comment string) (*Report, error) {
func (c *Client) Report(ctx context.Context, accountID ID, ids []ID, comment string) (*Report, error) {
params := url.Values{}
params.Set("account_id", fmt.Sprint(accountID))
params.Set("account_id", string(accountID))
for _, id := range ids {
params.Add("status_ids[]", fmt.Sprint(id))
params.Add("status_ids[]", string(id))
}
params.Set("comment", comment)
var report Report