我正在尝试使用以下代码列出组织中的董事会:
var serializer = new ManateeSerializer();
TrelloConfiguration.Serializer = serializer;
TrelloConfiguration.Deserializer = serializer;
TrelloConfiguration.JsonFactory = new ManateeFactory();
TrelloConfiguration.RestClientProvider = new WebApiClientProvider();
TrelloAuthorization.Default.AppKey = "<placeholder for my key>";
public IEnumerable<Board> GetBoards()
{
return new Search(SearchFor.IsOpen(), modelTypes: SearchModelType.Boards).Boards;
}
当我调用GetBoards()
时,出现此错误:
{"Trello reported an error: 'not logged in'"}
想通了,缺少这一行:
TrelloAuthorization.Default.UserToken = <UserToken>;