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

Added new DILA api route to get mairie info #1722

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

antoineludeau
Copy link
Member

Context

The api used to get "mairie" information (name, email, telephone and opening hours) is now deprecated : https://api.gouv.fr/les-api/api_etablissements_publics (deprecated)
The new API to use is the one from the DILA : https://api.gouv.fr/les-api/api-annuaire-administration-services-publics

Enhancement

This PR :

  • Replace the deprecated api by the DILA api
  • Format the result to get same format used in our code to display "mairie" information.

How to test

1- Clone this branch and start the app
2- Scroll down the main page in the section "Obtenez des informations sur les adresses d’une commune" and search for any "commune". Select a "commune" : it will open the "commune" page with all the related info. (exemple for "Bordeaux" : localhost:5000/commune/33063 <= adapt the port if you are running the app on another port than 5000)
3- Scroll down the "commune" page to the section "Contacter la commune" and click on the button "Contacter la mairie".
4- It opens a modal with the "mairie" information : name, email, phone number and opening hours

Capture d’écran 2024-04-10 à 11 02 22

5- You can also go to the "contact" page : http://localhost:5000/nous-contacter <= adapt the port if you are running the app on another port than 5000
6- Click on the button : "Je suis un particulier ou une entreprise et j’ai constaté une adresse manquante ou incorrecte."
7- In the search field, enter a "commune" and click on the selected one.
8- It should display the "mairie" information also.

Capture d’écran 2024-04-10 à 11 02 47

@antoineludeau antoineludeau self-assigned this Apr 10, 2024
@antoineludeau antoineludeau force-pushed the antoineludeau/new-api-annuaire branch 2 times, most recently from 4bca03f to 86fa703 Compare April 10, 2024 09:23
@vinsag vinsag force-pushed the antoineludeau/new-api-annuaire branch from 86fa703 to b15bef4 Compare April 16, 2024 15:07
@vinsag vinsag requested a review from jbouhadoun April 16, 2024 15:08
@antoineludeau antoineludeau force-pushed the antoineludeau/new-api-annuaire branch from b15bef4 to 7f05344 Compare April 18, 2024 13:03
@antoineludeau antoineludeau force-pushed the antoineludeau/new-api-annuaire branch from 7f05344 to 69e48e4 Compare April 18, 2024 14:21
@antoineludeau antoineludeau merged commit 08b94b4 into master Apr 18, 2024
2 checks passed
@antoineludeau antoineludeau deleted the antoineludeau/new-api-annuaire branch April 18, 2024 14:32
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

Successfully merging this pull request may close these issues.

2 participants