--- a/account.go Sun Apr 30 20:43:17 2017 +0200
+++ b/account.go Sun Apr 30 22:12:57 2017 +0200
@@ -328,24 +328,7 @@
params["exclude_replies"] = "true"
}
- var sl []Status
- var links apiLinks
- if err := mc.apiCall(endPoint, rest.Get, params, lopt, &links, &sl); err != nil {
- return nil, err
- }
- if lopt != nil { // Fetch more pages to reach our limit
- var statusSlice []Status
- for (lopt.All || lopt.Limit > len(sl)) && links.next != nil {
- newlopt := links.next
- links = apiLinks{}
- if err := mc.apiCall(endPoint, rest.Get, params, newlopt, &links, &statusSlice); err != nil {
- return nil, err
- }
- sl = append(sl, statusSlice...)
- statusSlice = statusSlice[:0] // Clear struct
- }
- }
- return sl, nil
+ return mc.getMultipleStatuses(endPoint, params, lopt)
}
// FollowRequestAuthorize authorizes or rejects an account follow-request