/// <summary> /// Get the board can be accessed by apiToken. /// </summary> /// <remarks> /// You can use this board to do something. Or you can use KanbanFlowClient to request manually. /// </remarks> /// <returns></returns> public async Task<Board> GetBoardAsync() { Board board = new Board(this); var boardResponse = await GetBoardInfo(); board.Id = boardResponse.Id; board.Name = boardResponse.Name; board.Users = await GetUsers(); board.Cells = await GetAllTasks(board); return board; }
internal async Task<Cell[]> GetAllTasks(Board board) { var body = await GetStringAsync("tasks"); var cells = JsonConvert.DeserializeObject<Cell[]>(body); foreach (var cell in cells) { foreach (var task in cell.Tasks) { task.Board = board; task.BoradClient = this; } } return cells; }