Reputation: 9991
I am trying to update a Trello card using Manatee Trello API. Here's the code:
Run(() =>
{
TrelloProcessor.WaitForPendingRequests = true;
var card = new Card("5609144868309d39826b61f1");
card.Name = "UPDATED: " + card.Name;
TrelloProcessor.Shutdown();
});
private static void Run(Action action)
{
var serializer = new ManateeSerializer();
TrelloConfiguration.Serializer = serializer;
TrelloConfiguration.Deserializer = serializer;
TrelloConfiguration.JsonFactory = new ManateeFactory();
//TrelloConfiguration.RestClientProvider = new RestSharpClientProvider();
TrelloConfiguration.RestClientProvider = new WebApiClientProvider();
TrelloAuthorization.Default.AppKey = authKey;
TrelloAuthorization.Default.UserToken = authToken;
TrelloConfiguration.ThrowOnTrelloError = true;
action();
}
The code fails complaining about a closed stream. If I put only readonly operations, then everything works fine. What can be a problem here?
Upvotes: 1
Views: 889
Reputation: 9991
It appeared that there was a bug in the version 1.0 of Manatee.Trello.WebApi NuGet package. Greg Dennis quickly responded and released version 1.0.1 if his library where this bug was fixed. Now the code posted above works fine.
Upvotes: 1