15 // GetSuggestions returns a list of follow suggestions from the server |
15 // GetSuggestions returns a list of follow suggestions from the server |
16 func (mc *Client) GetSuggestions(lopt *LimitParams) ([]Account, error) { |
16 func (mc *Client) GetSuggestions(lopt *LimitParams) ([]Account, error) { |
17 endPoint := "suggestions" |
17 endPoint := "suggestions" |
18 method := rest.Get |
18 method := rest.Get |
19 var accountList []Account |
19 var accountList []Account |
20 if err := mc.apiCall(endPoint, method, nil, lopt, nil, &accountList); err != nil { |
20 if err := mc.apiCall("v1/"+endPoint, method, nil, lopt, nil, &accountList); err != nil { |
21 return nil, err |
21 return nil, err |
22 } |
22 } |
23 return accountList, nil |
23 return accountList, nil |
24 } |
24 } |
25 |
25 |
26 // DeleteSuggestion removes the account from the suggestion list |
26 // DeleteSuggestion removes the account from the suggestion list |
27 func (mc *Client) DeleteSuggestion(accountID int64) error { |
27 func (mc *Client) DeleteSuggestion(accountID int64) error { |
28 endPoint := "suggestions/" + strconv.FormatInt(accountID, 10) |
28 endPoint := "suggestions/" + strconv.FormatInt(accountID, 10) |
29 method := rest.Delete |
29 method := rest.Delete |
30 return mc.apiCall(endPoint, method, nil, nil, nil, nil) |
30 return mc.apiCall("v1/"+endPoint, method, nil, nil, nil, nil) |
31 } |
31 } |