Update search to use v2 API endpoint
v1 has been disabled on most instances by now. The change is minor: hash-tags are now reported as proper structs instead of a simple string-array.
This commit is contained in:
parent
021f5d0019
commit
75578dd249
5 changed files with 9 additions and 9 deletions
|
@ -277,7 +277,7 @@ func (c *Client) Search(ctx context.Context, q string, resolve bool) (*Results,
|
|||
params.Set("q", q)
|
||||
params.Set("resolve", fmt.Sprint(resolve))
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue