Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intervention API data do not yield either author or législature as a properties #179

Open
Guillaume-Levrier opened this issue Apr 17, 2021 · 1 comment

Comments

@Guillaume-Levrier
Copy link
Contributor

Interventions retrieved through API such as

document_url: "http://www.nosdeputes.fr//api/document/Intervention/413005/json"

Do not yield the author of the intervention (while their official title is yielded). The solution to that would be to interrogate the séance API as the intervention document does yield a seance_id property. However, it does not yield a législature property, which is required by the API such as:

Par exemple pour la réunion (n° 1461) du 4 juin 2013 à 17h30 de la Commission des lois : https://www.nosdeputes.fr/14/seance/1461/xml

This is solvable by parsing the url_nosdeputes property which does yield the correct législature (as well as the séance id).

I believe it would still make sense to add this as a property.

@Guillaume-Levrier
Copy link
Contributor Author

Current fix:

let url = intervention.url_nosdeputes
let legislature = url.slice(url.indexOf("nosdeputes.fr/")+14,url.indexOf("/seance/"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant