4

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.

dmulter
  • 2,608
  • 3
  • 15
  • 24
Joel Lucsy
  • 8,520
  • 1
  • 29
  • 35
  • 2
    I have planned to include webhooks in the library, but I honestly haven't looked into it deeply yet. Knowing that you're looking for the feature, I can make it more of a priority. – gregsdennis Oct 24 '13 at 13:31

1 Answers1

2

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.

gregsdennis
  • 7,218
  • 3
  • 38
  • 71
  • Thanks. I was pressed for time and actually wrote my own handler. It's been up for a month or two. But I'd like to try what you've done at some point when I have a bit more free time. – Joel Lucsy Dec 13 '13 at 14:50
  • @Joel, are you able to share your code on how you got this to work? – c0D3l0g1c Mar 20 '16 at 13:26