public object Get(BoardRequest request)
		{

			Board board;
			try
			{
				var api = Connect(request);
				string.Format("Getting board {0}", request.BoardId).Debug();
				board = api.GetBoard(request.BoardId);
			}
			catch (Exception ex)
			{
				ex.Message.Error(ex);
				return ServerError(ex.Message);
			}

			var boardmodel = Mapper.Map<Models.Board>(board);

			var allLanes = new List<LeanKit.API.Client.Library.TransferObjects.Lane>();
			allLanes.AddRange(board.Backlog);
			allLanes.AddRange(board.Lanes);
			allLanes.AddRange(board.Archive);
			boardmodel.Lanes.Clear();
			foreach (var lane in allLanes.Where(x => x.ParentLaneId == 0))
			{
				var laneModel = Mapper.Map<LaneModel>(lane);
				MapChildLanes(allLanes, lane, laneModel, 0);
				boardmodel.Lanes.Add(laneModel);
			}

			var html = HtmlHelpers.RenderBoardRepresentationStatic(boardmodel.Lanes, true);
			boardmodel.LaneHtml = html;

			return OK(boardmodel);
		}
        public object Get(BoardRequest request)
        {
            Board board;

            try
            {
                var api = Connect(request);
                string.Format("Getting board {0}", request.BoardId).Debug();
                board = api.GetBoard(request.BoardId);
            }
            catch (Exception ex)
            {
                ex.Message.Error(ex);
                return(ServerError(ex.Message));
            }

            var boardmodel = Mapper.Map <Models.Board>(board);

            var allLanes = new List <LeanKit.API.Client.Library.TransferObjects.Lane>();

            allLanes.AddRange(board.Backlog);
            allLanes.AddRange(board.Lanes);
            allLanes.AddRange(board.Archive);
            boardmodel.Lanes.Clear();
            foreach (var lane in allLanes.Where(x => x.ParentLaneId == 0))
            {
                var laneModel = Mapper.Map <LaneModel>(lane);
                MapChildLanes(allLanes, lane, laneModel, 0);
                boardmodel.Lanes.Add(laneModel);
            }

            var html = HtmlHelpers.RenderBoardRepresentationStatic(boardmodel.Lanes, true);

            boardmodel.LaneHtml = html;

            return(OK(boardmodel));
        }