Process Trello webhook response using Manatee.Trello

962 views Asked by At

I have an implementation of webhooks originating from Trello. The JSON response is put into a queue and I'm writing code that will process this queue. I'm using Manatee.Trello to talk with Trello.

The webhook response from Trello includes an action and a model. I don't care about the model, but need to react to the action and it's associated data. I see that Manatee.Trello has classes for all the Actions, but I don't see how I could deserialize the JSON I have representing the action into the appropriate class.

I'm currently using the Manatee.Json classes to break out the data, but I'd rather have the fully typed classes to deal with.

1

There are 1 answers

2
gregsdennis On

Joel, you may have seen it, but I wanted to finally answer the question.

I have added the Webhook implementation to Manatee.Trello. To use it, you'll need to pass the string content of the POST you receive from Trello into TrelloService.ProcessWebhookNotification(string content). The library will automatically deserialize it and update the appropriate entity.

See https://bitbucket.org/gregsdennis/manatee.trello/wiki/Webhooks for more on the implementation.