DemocracyOS / democracyos

Democracia en Red is focusing on specific implementations of DemocracyOS. We are working now working with governments and activists all over Latin America. If you are interested in our online participation tools you can check them out on our site.
https://democraciaos.org/en/
GNU General Public License v3.0
1.77k stars 616 forks source link

[v3] Reactions feed admin #1538

Closed guillecro closed 6 years ago

guillecro commented 6 years ago
guillecro commented 6 years ago

Some updates about the current state: I am working on the API Service for Reactions that will bring an organized dataSet needed to display graphs or list users. I found two useful cases:

This is an example of fetching results of a instance with a LIKE reaction:

GET http://localhost:3000/api/v1.0/services/reactions/5a942ffeada5102ae2b71021/result
{
    "id": "5a942ffeada5102ae2b71021",
    "reactionRule": {
        "startingDate": "2018-02-26T16:01:52.296Z",
        "method": "LIKE",
        "name": "For Images",
        "limit": "12"
    },
    "participants": [
        {
            "_id": "5aa1464a5fb50629d20f0dac",
            "name": "Guillermo User1"
        },
        {
            "_id": "5aa1464a5fb50629d20f0dad",
            "name": "Guillermo User2"
        },
        {
            "_id": "5aa1464a5fb50629d20f0dae",
            "name": "Guillermo User3"
        }
    ],
    "data": {
        "name": "LIKE",
        "value": 3
    }
}

This service can be used by the AoE and by the page. Right now it is working perfectly with custom components inside admin-on-rest. Next step is to develop a dashboard component.

guillecro commented 6 years ago

Just an update: Pretty close closing this issue and making my pull request, but i am dealing with unit testing (sinon rewire and sinon-mongoose) Please be patient! Thanks! :raised_hands: