コード例 #1
0
        public IEnumerable <Card> GetCardsForBoard(string boardId)
        {
            var url = string.Format("https://api.trello.com/1/boards/{0}?cards=open&key={1}&token={2}",
                                    boardId,
                                    _trelloConfiguration.AppKey,
                                    _trelloConfiguration.UserToken);

            var jsonData = _trelloGateway.GetJsonData(url);

            return(_jsonParser.GetCards(jsonData));
        }
コード例 #2
0
        public IEnumerable <Card> GetCardsForBoard(string boardId)
        {
            var cardsJson          = _trelloRestGateway.GetCardsForBoard(boardId);
            var cards              = _jsonParser.GetCards(cardsJson).ToArray();
            var lists              = _jsonParser.GetLists(cardsJson).ToArray();
            var listLookupFunction = List.CreateLookupFunction(lists);

            foreach (var card in cards)
            {
                var cardJson = _trelloRestGateway.GetCardWithHistory(card.Id);
                _jsonParser.ProcessCardHistory(card, cardJson, listLookupFunction);
            }
            return(cards);
        }