| 127 | } |
| 128 | |
| 129 | func (c *ModerationClient) UpdateStatusBatch(ctx context.Context, req UpdateStatusBatchRequest) (*UpdateStatusBatchResponse, error) { |
| 130 | // Validate the request |
| 131 | if err := validateUpdateStatusBatchRequest(req); err != nil { |
| 132 | return nil, err |
| 133 | } |
| 134 | |
| 135 | endpoint := c.client.makeEndpoint("moderation/status/batch/") |
| 136 | |
| 137 | resp, err := c.client.post(ctx, endpoint, req, c.client.authenticator.moderationAuth) |
| 138 | if err != nil { |
| 139 | return nil, err |
| 140 | } |
| 141 | |
| 142 | var result UpdateStatusBatchResponse |
| 143 | if err := json.Unmarshal(resp, &result); err != nil { |
| 144 | return nil, err |
| 145 | } |
| 146 | |
| 147 | return &result, nil |
| 148 | } |
| 149 | |
| 150 | func validateUpdateStatusBatchRequest(req UpdateStatusBatchRequest) error { |
| 151 | // Check moderator ID |