openpolis / op_api3

Generic Openpolis API, v.3, using django-rest-framework
2 stars 0 forks source link

Use of the api #2

Open hokodaime opened 8 years ago

hokodaime commented 8 years ago

I didn't know if that it's the right place for this help request, i hope so. I have to use the api from the openpolis repository on github. These repository had a djiango rest framework api, https://github.com/openpolis/op_api3/blob/master/api_project/parlamento/urls.py I've tryed to change the endpoint from urls.py to groups/ https://github.com/openpolis/op_api3/blob/master/api_project/parlamento/groups/ but as result I've received a bad request response. Someone can make me a use exemple of a right request on these API?

guglielmo commented 8 years ago

Hi @hokodaime, this is definitely the right place to ask for support.

As for your request, the http://api3.openpolis.it/parlamento/ endpoint shows all possible Legislatures of the italian parliament. There you can ask for the groups in a particular legislature. For example, for the current one (XVII): http://api3.openpolis.it/parlamento/17/groups/, or the previous one: http://api3.openpolis.it/parlamento/16/groups/.

Hope this helps you.

hokodaime commented 8 years ago

Thank you! Very helpfull