How to retrieve a board background color or image in Manatee.Trello?

210 Views Asked by At

I am trying to retrieve an existing board background color or image using Manatee.Trello. Here is what I've tried so far :

Board myboard =  new Search(SearchFor.TextInName("MyAwesomeBoard"), 1, SearchModelType.Boards).Boards.FirstOrDefault();
var boardColor = myboard.Preferences.Background.Color;
var boardImg = myboard.Preferences.Background.Image;

According to the accessors signatures, this should return either a string or a WebColor. It compiles fine, but at runtime I get the following error :

NullReferenceException: Object reference not set to an instance of an object

Even though the board currently has an image or color background. Is there another way to access this info or is there a bug in Manatee.Trello ?

1

There are 1 best solutions below

0
On BEST ANSWER

This is a bug in the search and will be resolved in the next release. I've created issue 68 to track it.

Update

Please see version 1.17.0 for the fix.