maiera/gde-app — pull request #43 by Scarygami (2014-07-22 12:09:18+00:00)
Title: Refactor post creation from API Data

Getting rid of a lot of repetitive code by introducing a `postFromApi` utility function.

In the long run this will make things a lot easier to maintain, especially as we are about to add more metrics to the reports.

Some more improvements possible here, like a util function to take care of accumulating `totalPlus1s`, `totalResharers` (and any other metrics that might come) which is the same code for the different reports as well. I can add this to this PR if you want.