mysociety / popit

DEPRECATED - Development on PopIt has stopped and it is no longer being maintained
https://goo.gl/Vvej4Q
Other
76 stars 33 forks source link

JavaScript client API #518

Open martinszy opened 10 years ago

martinszy commented 10 years ago

Cargografías http://cargografias.org/ is a data visualization initiative that works with the work history of politicians, they intend to use PopIt as a backend to store politicians information such as their work history in a way that will let them create graphs and analysis.

They want to use PopIt directly from JavaScript, is that possible or has anyone worked on that?

mhl commented 10 years ago

Hi @martinszy. The idea in the past has been that because PopIt is RESTful, return JSON and supports JSONP, it should be easy to use from Javascript without having a library specifically for that language. However, after some discussion we think we may well rethink that.

In any case, as an example of how one could use PopIt from Javascript, I made a fairly minimal example which uses client-side Javascript in the browser to render a list of current members of South Africa's National Assembly. This exposed three or four problems that I've now created issues for, but may still be a useful example:

The referenced issues are: