code4romania / sna-client

Client pentru aplicația de vizualizare a statisticilor SNA
https://code4.ro/en/project/portalul-strategiei-nationale-anticoruptie/
Mozilla Public License 2.0
1 stars 1 forks source link

Integrate front-end with back-end API #44

Closed LucianU closed 7 years ago

LucianU commented 7 years ago

API spec is here: http://sna.code4.ro/swagger/dist/index.html

The endpoint that seems the most useful is /answers/{institutionType}. It returns all the data for a specific type of institution. For example /answers/ministry returns all the answers to all questions for all ministries.

This is almost the equivalent of the current way of retrieving the stats. For example, to retrieve ministries, now we make a request to /public/data/ministries_stats.json.

LucianU commented 7 years ago

Fixed.