unsub from feed

This commit is contained in:
Adam R Grey 2023-04-04 15:01:50 -04:00
parent bbf090eae9
commit c53752d305

View File

@ -692,11 +692,21 @@ namespace ttrss_co_client.ttrss
var apiResponse = await get<Dictionary<string, Dictionary<string, int>>>(json); var apiResponse = await get<Dictionary<string, Dictionary<string, int>>>(json);
return apiResponse["status"]["code"]; return apiResponse["status"]["code"];
} }
public async Task UnsubscribeFeed() public async Task<bool> UnsubscribeFeed(int feed_id)
{ {
assertInitialized(); assertInitialized();
assertApiLevel(5); assertApiLevel(5);
throw new NotImplementedException();
var json = JsonContent.Create(new
{
op = "unsubscribeFeed",
sid = this.SessionId,
feed_id = feed_id.ToString()
});
var apiResponse = await get<Dictionary<string, string>>(json);
return apiResponse.ContainsKey("status") && apiResponse["status"]?.ToLower() == "ok";
} }
public async Task GetFeedTree() public async Task GetFeedTree()
{ {