@dillenmeister我尝试过Trello.NET包装器,但在成功接受AppKey和Token后总是返回NULL。我确信AppKey和Token是正确的,因为当我故意输入错误的AppKey/Token时,我得到了错误。
我安装的包的版本是:
Trello.NET 0.6.2 Json.NET 7.0.1 RestSharp 105.1.0
下面是类级上的程序集引用:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using TrelloNet;
using RestSharp;
using Newtonsoft.Json.Serialization;
public partial class TestTrello : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
ITrello trello = new Trello("[AppKey]");
trello.Authorize("[Token]");
// Get a board
Board theTrelloDevBoard = trello.Boards.WithId("[boardId]");
string boardName = theTrelloDevBoard.Name;
}
}那么,为了让它工作,我遗漏了什么呢?
发布于 2015-12-16 04:06:28
看起来像是a color enum is missing some colors。这会在您尝试下载电路板数据时导致异常。有several pull requests可以纠正这个问题,但是创建者还没有合并一个,可能是因为所有的PR都导致测试套件失败。
作为一种快速解决方法,您可以克隆存储库:
git clone https://github.com/dillenmeister/Trello.NET.git更新Cards\Color.cs文件
public enum Color
{
Green, Yellow, Orange, Red, Purple, Blue, Turquoise, Lightgreen, Pink, Sky, Lime, Black
}然后,..and在Visual Studio中构建该项目。将生成的TrelloNet.dll作为引用添加到您的项目中,您应该能够获得线路板数据。
更新
通过@ajwaka的评论: Nuget由同一个开发人员提供了TrelloNet.Temp.Fork,它似乎可以工作。
https://stackoverflow.com/questions/31447368
复制相似问题