26 SpoilerText string |
26 SpoilerText string |
27 Visibility string // "direct", "private", "unlisted" or "public" |
27 Visibility string // "direct", "private", "unlisted" or "public" |
28 } |
28 } |
29 |
29 |
30 // getMultipleStatuses returns a list of status entities |
30 // getMultipleStatuses returns a list of status entities |
31 // If opts.All is true, several requests will be made until the API server |
31 // If lopt.All is true, several requests will be made until the API server |
32 // has nothing to return. |
32 // has nothing to return. |
33 func (mc *Client) getMultipleStatuses(endPoint string, params apiCallParams, lopt *LimitParams) ([]Status, error) { |
33 func (mc *Client) getMultipleStatuses(endPoint string, params apiCallParams, lopt *LimitParams) ([]Status, error) { |
34 var statuses []Status |
34 var statuses []Status |
35 var links apiLinks |
35 var links apiLinks |
36 if err := mc.apiCall(endPoint, rest.Get, params, lopt, &links, &statuses); err != nil { |
36 if err := mc.apiCall(endPoint, rest.Get, params, lopt, &links, &statuses); err != nil { |
175 } |
175 } |
176 |
176 |
177 // GetStatusRebloggedBy returns a list of the accounts who reblogged a status |
177 // GetStatusRebloggedBy returns a list of the accounts who reblogged a status |
178 func (mc *Client) GetStatusRebloggedBy(statusID int64, lopt *LimitParams) ([]Account, error) { |
178 func (mc *Client) GetStatusRebloggedBy(statusID int64, lopt *LimitParams) ([]Account, error) { |
179 o := &getAccountsOptions{ID: statusID, Limit: lopt} |
179 o := &getAccountsOptions{ID: statusID, Limit: lopt} |
180 return mc.getMultipleAccounts("reblogged_by", o) |
180 return mc.getMultipleAccountsHelper("reblogged_by", o) |
181 } |
181 } |
182 |
182 |
183 // GetStatusFavouritedBy returns a list of the accounts who favourited a status |
183 // GetStatusFavouritedBy returns a list of the accounts who favourited a status |
184 func (mc *Client) GetStatusFavouritedBy(statusID int64, lopt *LimitParams) ([]Account, error) { |
184 func (mc *Client) GetStatusFavouritedBy(statusID int64, lopt *LimitParams) ([]Account, error) { |
185 o := &getAccountsOptions{ID: statusID, Limit: lopt} |
185 o := &getAccountsOptions{ID: statusID, Limit: lopt} |
186 return mc.getMultipleAccounts("favourited_by", o) |
186 return mc.getMultipleAccountsHelper("favourited_by", o) |
187 } |
187 } |
188 |
188 |
189 // PostStatus posts a new "toot" |
189 // PostStatus posts a new "toot" |
190 // All parameters but "text" can be empty. |
190 // All parameters but "text" can be empty. |
191 // Visibility must be empty, or one of "direct", "private", "unlisted" and "public". |
191 // Visibility must be empty, or one of "direct", "private", "unlisted" and "public". |