datatlas-erasme / back

[DEPRECATED] Back-office for DATATLAS project
https://github.com/datatlas-erasme/datatlas
GNU Affero General Public License v3.0
0 stars 0 forks source link

Add a new wordpress content type [Evenements] #5

Closed Pipazoul closed 2 years ago

Pipazoul commented 2 years ago

Is your feature request related to a problem? Please describe. A new content type has been added on wordpress (evenement)

Describe the solution you'd like when called on route api/data/wordpress/canographia.datagora.erasme.org/wp-json/wp/v2/evenement/

The back should return :

racine-p-a commented 2 years ago

Can't find any image on this page : https://canographia.datagora.erasme.org/wp-json/wp/v2/evenement/

edit : @Pipazoul

edit2 : the only picture fount is acf.contact_image which id is 3913 which brings to https://canographia.datagora.erasme.org/wp-json/wp/v2/media/3913 which brings to this final picture : https://canographia.datagora.erasme.org/wp-content/uploads/2022/06/porteur1.png

The only picture on the WP page (two events but only one has this kind of image)

racine-p-a commented 2 years ago

The route should work (with blank images because I am unable to find them)

Pipazoul commented 2 years ago

Can't find any image on this page : https://canographia.datagora.erasme.org/wp-json/wp/v2/evenement/

edit : @Pipazoul

edit2 : the only picture fount is acf.contact_image which id is 3913 which brings to https://canographia.datagora.erasme.org/wp-json/wp/v2/media/3913 which brings to this final picture : https://canographia.datagora.erasme.org/wp-content/uploads/2022/06/porteur1.png

The only picture on the WP page (two events but only one has this kind of image)

The images are stored as and id in acf.photos[arrayNum] With the id you can request /wp-json/wp/v2/media/imageID The url of the image will be found in this route in guid.rendered for example

racine-p-a commented 2 years ago

Should be done, now. @Pipazoul https://github.com/datatlas-erasme/back/commit/6a75d2bd1bdc7fcd025cdc0c13d922a7db89b0e8