pleroma: add Delete()
This commit is contained in:
parent
43ec5a372d
commit
c15371ea9f
1 changed files with 15 additions and 0 deletions
|
@ -232,5 +232,20 @@ public class Pleroma
|
||||||
req.Fields.Accept = [JsonMIMEType];
|
req.Fields.Accept = [JsonMIMEType];
|
||||||
return RequestJSONRetry<Context>(req);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue