RunnicFusion
RunnicFusion

Reputation: 193

Manatee ManateeSerialzier

I'm trying to build an application that used the Manatee nuget package. https://www.nuget.org/packages/Manatee.Trello/ (version 1.11.1)

I have the following code inside my controller:

var serializer = new ManateeSerializer();
TrelloConfiguration.Serializer = serializer;
TrelloConfiguration.Deserializer = serializer;
TrelloConfiguration.JsonFactory = new ManateeFactory();
TrelloConfiguration.RestClientProvider = new WebApiClientProvider();
TrelloAuthorization.Default.AppKey = "[key]";
TrelloAuthorization.Default.UserToken = "[token]";

With the following usings:

using Manatee.Trello;
using Manatee.Trello.Json;
using Manatee.Trello.Rest;
using Manatee.Trello.Contracts;
using Manatee.Trello.Exceptions;

Maybe this is a simple question but I don't know how to get this working. Do I need to create my own ManateeSerializer class? Looks like I'm doing this in the wrong order.

My project gives me errors on the ManateeSerializer(), ManateeFactory() and WebApiClientProvider() class. no reference, so there is something missing? But I don't know what.

Also installed some other Manatee packages because is thought something was not inside the Manatee.Trello nugget package. (installed: Manatee.Trello.RestSharp version 1.2.1 and Mantee.Trello.Json - version 4.0.1)

The wiki tells me this: https://bitbucket.org/gregsdennis/manatee.trello/wiki/Usage

Upvotes: 2

Views: 463

Answers (1)

gregsdennis
gregsdennis

Reputation: 8428

I'm not certain what's not working for you from your question, but everything you posted so far looks good. What you have is just the initial configuration. Now you can start pulling data for boards, cards, etc. To do that, you just need to use the constructor, passing in the ID for the entity you want.

var card = new Card("[cardId]");
var board = new Board("[boardId]");
var list = card.List;

NOTE Since you're using the WebApiClientProvider, you shouldn't need the RestSharp package. You can uninstall that.

UPDATE 1 The following packages must also be installed to make this code build:

Upvotes: 2

Related Questions