get tree
This commit is contained in:
parent
c53752d305
commit
3936850913
@ -708,11 +708,20 @@ namespace ttrss_co_client.ttrss
|
||||
|
||||
return apiResponse.ContainsKey("status") && apiResponse["status"]?.ToLower() == "ok";
|
||||
}
|
||||
public async Task GetFeedTree()
|
||||
///<returns>(almost) the whole shebang, for a user</returns>
|
||||
public async Task<Tree> GetFeedTree(bool include_empty = false)
|
||||
{
|
||||
assertInitialized();
|
||||
assertApiLevel(5);
|
||||
throw new NotImplementedException();
|
||||
|
||||
var json = JsonContent.Create(new
|
||||
{
|
||||
op = "getFeedTree",
|
||||
sid = this.SessionId,
|
||||
include_empty = include_empty
|
||||
});
|
||||
|
||||
return await get<Tree>(json);
|
||||
}
|
||||
private void assertInitialized()
|
||||
{
|
||||
|
32
ttrss/datastructures/Tree.cs
Normal file
32
ttrss/datastructures/Tree.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ttrss_co_client.ttrss.datastructures
|
||||
{
|
||||
public class Tree
|
||||
{
|
||||
public ItemCollection categories { get; set; }
|
||||
|
||||
public class ItemCollection
|
||||
{
|
||||
public string identifier { get; set; }
|
||||
public string label { get; set; }
|
||||
public IEnumerable<Item> items { get; set; }
|
||||
public class Item
|
||||
{
|
||||
public string id { get; set; }
|
||||
public int? bare_id { get; set; }
|
||||
public int? auxcounter { get; set; }
|
||||
public string name { get; set; }
|
||||
public IEnumerable<Item> items { get; set; }
|
||||
public bool? checkbox { get; set; }
|
||||
public string type { get; set; }
|
||||
public int? unread { get; set; }
|
||||
public int? child_unread { get; set; }
|
||||
public string param { get; set; }
|
||||
public string fg_color { get; set; }
|
||||
public string bg_color { get; set; }
|
||||
public int? updates_disabled { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user