pleroma: add Delete()

This commit is contained in:
uwaa 2024-11-30 13:14:20 +00:00
parent 43ec5a372d
commit c15371ea9f

View file

@ -232,5 +232,20 @@ public class Pleroma
req.Fields.Accept = [JsonMIMEType];
return RequestJSONRetry<Context>(req);
}
/// <summary>
/// Deletes a status.
/// </summary>
public Task Delete(Status status)
=> Delete(status.ID);
/// <summary>
/// Deletes a status by ID.
/// </summary>
public Task Delete(string status_id)
{
HttpRequest req = new HttpRequest(HttpMethod.DELETE, $"/api/v1/statuses/{status_id}");
req.Fields.Accept = [JsonMIMEType];
return RequestJSONRetry(req);
}
}