我怎样才能使用Trello.NET从Trello所有电路板? [英] How can I get all boards from Trello using Trello.NET?
问题描述
下面是我的code:
ITrello trello = new Trello("MyAppToken");
trello.Authorize("MyUserToken");
Member me = trello.Members.Me();
var cards = trello.Cards.ForMe();
var allboards = trello.Boards.ForMe();
所以,我得到了我所有的卡没有任何问题。但是,我怎么能得到我所有的板?
它总是空,我不明白是什么问题。我的用户和应用程序令牌是有效的。
So I got all my cards without any problems. But how can I get all my boards? It's always null and I don't understand what is the problem. My user and application tokens are valid.
我的的我的对象不为空,我有我的帐户信息。
My me object is not null and I have information about my account.
我错过了什么?
谢谢!
What did I miss? Thank you!
UPD:我甚至不能用板ID得到董事会。我从卡上得到了板卡ID。
UPD: I can't even get board by board ID. I got the boardId from the card.
推荐答案
最后,我明白了!
当我从trello API得到了JSON对象,并试图序列化有一个例外。包含在Trello.JSON颜色枚举有没有足够的颜色API。所以我加了颜色缺失。
When I got json object from trello API and tried to serialize it there was an exception. Enum that contains colors in Trello.JSON had not enough colors for API. So I added missing colors.
public enum Color
{
Green,
Yellow,
Orange,
Red,
Purple,
Blue,
Turquoise,
Lightgreen,
Pink,
Sky,
Lime,
Black
}
这篇关于我怎样才能使用Trello.NET从Trello所有电路板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!