aboutsummaryrefslogtreecommitdiff
path: root/mastodon/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon/status.go')
-rw-r--r--mastodon/status.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/mastodon/status.go b/mastodon/status.go
index edd88e9..816d092 100644
--- a/mastodon/status.go
+++ b/mastodon/status.go
@@ -284,12 +284,15 @@ func (c *Client) DeleteStatus(ctx context.Context, id string) error {
}
// Search search content with query.
-func (c *Client) Search(ctx context.Context, q string, resolve bool) (*Results, error) {
+func (c *Client) Search(ctx context.Context, q string, qType string, limit int, resolve bool, offset int) (*Results, error) {
params := url.Values{}
params.Set("q", q)
+ params.Set("type", qType)
+ params.Set("limit", fmt.Sprint(limit))
params.Set("resolve", fmt.Sprint(resolve))
+ params.Set("offset", fmt.Sprint(offset))
var results Results
- err := c.doAPI(ctx, http.MethodGet, "/api/v1/search", params, &results, nil)
+ err := c.doAPI(ctx, http.MethodGet, "/api/v2/search", params, &results, nil)
if err != nil {
return nil, err
}