status.go
changeset 238 1c0042e76902
parent 234 e37050f8a4bf
child 243 7386c6a454a8
--- a/status.go	Thu Sep 06 00:34:44 2018 +0200
+++ b/status.go	Thu Sep 06 01:07:40 2018 +0200
@@ -44,7 +44,7 @@
 func (mc *Client) getMultipleStatuses(endPoint string, params apiCallParams, lopt *LimitParams) ([]Status, error) {
 	var statuses []Status
 	var links apiLinks
-	if err := mc.apiCall(endPoint, rest.Get, params, lopt, &links, &statuses); err != nil {
+	if err := mc.apiCall("v1/"+endPoint, rest.Get, params, lopt, &links, &statuses); err != nil {
 		return nil, err
 	}
 	if lopt != nil { // Fetch more pages to reach our limit
@@ -52,7 +52,7 @@
 		for (lopt.All || lopt.Limit > len(statuses)) && links.next != nil {
 			newlopt := links.next
 			links = apiLinks{}
-			if err := mc.apiCall(endPoint, rest.Get, params, newlopt, &links, &statusSlice); err != nil {
+			if err := mc.apiCall("v1/"+endPoint, rest.Get, params, newlopt, &links, &statusSlice); err != nil {
 				return nil, err
 			}
 			statuses = append(statuses, statusSlice...)
@@ -83,7 +83,7 @@
 		endPoint += "/" + op
 	}
 
-	return mc.apiCall(endPoint, rest.Get, nil, nil, nil, data)
+	return mc.apiCall("v1/"+endPoint, rest.Get, nil, nil, nil, data)
 }
 
 // updateStatusData updates the statuses
@@ -155,7 +155,7 @@
 		}
 	}
 
-	return mc.apiCall(endPoint, method, params, nil, nil, data)
+	return mc.apiCall("v1/"+endPoint, method, params, nil, nil, data)
 }
 
 // GetStatus returns a status