culturecreates / footlight-aggregator

A tool to inject entities from Artsdata to footlight
0 stars 0 forks source link

Aggregate Culture Mauricie events (Shawinigan, Cogecoa and Tourisme Mauricie) and Caligram events using APIs #72

Closed saumier closed 1 week ago

saumier commented 7 months ago

Our next CMS client is Culture Mauricie.

They were using Caligram CMS, and are now switching to Footlight CMS because Caligram is closing.

In the past, they were loading events from these 3 APIs. Our challenge is to design and build a tool to load events from APIs in a generic way so that we can repeat with other customers without releasing new code.

This can be split into separate issues to track work, but this issue should be kept as the high-level issue for the design of the generic solution.

Shawinigan

Culture Shawinigan is a city arts council for the town of Shawinigan

API to a local ticketing platform https://api.ticketacces.net/v1/showtimes?KeyID=CULTURESHAWI&KeySecret=wMalrXUtnFEMIK7PDENGbPxRfiGY&Domains=shawinigan.ticketacces.net&Language=fr

Important: this API must not be called more than 2 or 3 times a day.

Cogeco

https://www.amphitheatrecogeco.com/ l’Amphithéâtre Cogeco is a theatre in a city called Trois-Rivieres, one of the oldest cities in Quebec.

API http://amphitheatrecogeco.com/json?module=spectacle&method=getspectacles

FYI: This site is already being crawled by Footlight Console as an experiment. https://console.footlight.io/events?seedurl=amphitheatrecogeco-com&view=list

Tourisme

https://www.tourismemauricie.com/ For a short while we will load event from this site, but a few months later they will also switch to Footlight CMS as a fourth client (we will then have to figure out how to share events between calendars in the CMS.)

API https://www.tourismemauricie.com/wp-admin/admin-ajax.php?action=caligram

sahalali commented 4 months ago

@tammy-culture I will check it.

sahalali commented 4 months ago

@tammy-culture The issue was related to a mapping file we use to map the event type from the source to CMS. The issue is now fixed. Assigning this issue to you @tammy-culture for review. If you see any issues, please assign this issue back to me.

tammy-culture commented 4 months ago

Hi @sahalali I still notice a problem with missing event types.

Here is an event in Footlight production with a missing Event Type:

Image

Here is how this same event appears on the current Culture Mauricie event listing website called D'ici.ca. Notice on the top left had corner MUSIQUE which indicated the event type. I am assuming that event types are availabe in the acaligram API. Is that right?

Image

For reference, here is a link to the actual webpage. https://dici.ca/evenements/les-eleves-du-conservatoire-de-musique-de-trois-rivieres-les-mercredis-au-conservatoire

Can we fix this?

Thanks.

tammy-culture commented 4 months ago

Here is another example.

What we have for an event in Production CMS - the event type is missing.

Image

Versus the event type indicated on the webpage - THÉÂTRE - in the top left hand corner.

Image

Here is a link to the actual webpage: https://dici.ca/evenements/theatre-des-gens-de-la-place-les-botuliques

Thanks.

sahalali commented 4 months ago

I did a detailed analysis of the Caligram API response, the property 'tags' were serving few more "eventTypes". So now we can see more additional types loaded to CMS. @tammy-culture Can you please review it again.

tammy-culture commented 4 months ago

@sahalali

In the acaligram user the Event URLs in the production CMS are not correct. Here is an example:

Screenshot 2024-02-14 at 09 34 18

This link (http://culturemauricie.com/evenements/peaux-d-ames/25379) is broken and goes no where.

Here is a link to the current event page : https://dici.ca/evenements/peaux-d-ames

I think I need clarification on what URL is needed in this field.

Thanks.

tammy-culture commented 4 months ago

@sahalali The additional event types are looking good!

tammy-culture commented 4 months ago

@sahalali I just spoke with the client and I have the following question:

It looks like Place addresses from the acaligram user are not appearing in the production CMS - even though addresses are available in acaligram (I confirmed with the client).

Is there a way to fix this ? Does this have anything to do with issue #971 ?

Many thanks, Tammy

sahalali commented 4 months ago

Event URL: The eventURL in the Caligram API responses for both event listing and event details are broken URLs.

I could not find a way to create non-breaking URLs from the API responses.

I think we should remove these eventURLs from the CMS unless we find the correct URLs. What do you think @tammy-culture?

I've added the API responses below for reference.

Here is the resposne from event listing: { "id": 25379, "title": "Peaux d'âmes", "slug": "peaux-d-ames", "description": "<p>François Bertrand, sculpteur textile <a href=\"https://museepop.us5.list-manage.com/track/click?u=3477a542e061fe9951fb61499&amp;id=21bf5da879&amp;e=ceedd7cf80\">François Bertrand</a> est né à Montréal en 1961 et vit à Québec depuis 1981. Il a travaillé comme expert-conseil en psychiatrie pendant plus de 30 ans et comme psychologue en pratique privée pendant une dizaine d’années. En 2001, il fonde le <a href=\"https://museepop.us5.list-manage.com/track/click?u=3477a542e061fe9951fb61499&amp;id=c2446d6110&amp;e=ceedd7cf80\">Programme Vincent et moi</a> à l’Institut universitaire en santé mentale de Québec, aujourd’hui CIUSSS de la Capitale-Nationale. Par le biais de ce programme dédié aux artistes en arts visuels vivant avec la maladie mentale, il lutte pour faire connaître et reconnaître leur contribution artistique et culturelle. À cette fin, il ouvre entre autres, la <a href=\"https://museepop.us5.list-manage.com/track/click?u=3477a542e061fe9951fb61499&amp;id=6786a186e8&amp;e=ceedd7cf80\">Galerie Vincent et moi </a>en 2013. </p>", "start_date": "2023-05-01T10:00:00.000000Z", "end_date": "2024-03-31T17:00:00.000000Z", "next_date": "2024-02-15 10:00:00", "event_dates_count": 46, "venues_count": 1, "display_image_url": ["https://cdn.caligram.com/uploads/event/wOX/medium/644fc6ddc7663.jpg"](https://cdn.caligram.com/uploads/event/wOX/medium/644fc6ddc7663.jpg), "photo_url": ["https://cdn.caligram.com/uploads/event/wOX/medium/644fc6ddc7663.jpg"](https://cdn.caligram.com/uploads/event/wOX/medium/644fc6ddc7663.jpg), "public": true, "extra_large_photo_url": ["https://cdn.caligram.com/uploads/event/wOX/xlarge/644fc6ddc7663.jpg"](https://cdn.caligram.com/uploads/event/wOX/xlarge/644fc6ddc7663.jpg), "thumbnail_url": ["https://cdn.caligram.com/uploads/event/wOX/thumbnail/644fc6ddc7663.jpg"](https://cdn.caligram.com/uploads/event/wOX/thumbnail/644fc6ddc7663.jpg), "website_url": null, "lang": "fr", "created_at": "2023-05-01T14:04:31+00:00", "updated_at": "2023-05-01T17:31:28+00:00", "featured": false, "url": ["http://culturemauricie.com/evenements/peaux-d-ames/25379"](http://culturemauricie.com/evenements/peaux-d-ames/25379), "calendar_id": 38, "status": "published", "translations": [ { "locale": "fr", "path": ["http://culturemauricie.com/evenements/peaux-d-ames/25379"](http://culturemauricie.com/evenements/peaux-d-ames/25379) } ], "author": { "user_id": 1799, "name": "Alexis Vaillant-Gamache" }, "tags": [ ], "venue": { "id": 8165, "cc_id": null, "eb_id": null, "name": "Musée POP", "slug": "musee-pop", "description": null, "other_names": "", "address": "200 Rue Laviolette Suite 1", "address2": null, "city": "Trois-Rivières", "state": null, "country": null, "zip": "G9A 6L5", "region_id": 506, "latitude": 46.3447446, "longitude": -72.5401555, "phone": "819-372-0406", "telephone": "819-372-0406", "website_url": ["https://museepop.ca/"](https://museepop.ca/), "link": ["https://museepop.ca/"](https://museepop.ca/), "business_hours": null, "created_at": "2021-10-05T18:05:28+00:00", "updated_at": "2021-10-05T18:05:28+00:00" }, "types": [ { "id": 31, "parent_id": 22, "name": "Exposition", "slug": "exposition-ou-vernissage" } ] }

Here is the event details API response: `{ "id": 25379, "contact_email": "", "contact_name": "", "contact_phone": "", "contact_url": "", "date_notes": null, "description": "

François Bertrand, sculpteur textile <a href=\"https://museepop.us5.list-manage.com/track/click?u=3477a542e061fe9951fb61499&amp;id=21bf5da879&amp;e=ceedd7cf80\">François Bertrand est né à Montréal en 1961 et vit à Québec depuis 1981. Il a travaillé comme expert-conseil en psychiatrie pendant plus de 30 ans et comme psychologue en pratique privée pendant une dizaine d’années. En 2001, il fonde le <a href=\"https://museepop.us5.list-manage.com/track/click?u=3477a542e061fe9951fb61499&amp;id=c2446d6110&amp;e=ceedd7cf80\">Programme Vincent et moi à l’Institut universitaire en santé mentale de Québec, aujourd’hui CIUSSS de la Capitale-Nationale. Par le biais de ce programme dédié aux artistes en arts visuels vivant avec la maladie mentale, il lutte pour faire connaître et reconnaître leur contribution artistique et culturelle. À cette fin, il ouvre entre autres, la <a href=\"https://museepop.us5.list-manage.com/track/click?u=3477a542e061fe9951fb61499&amp;id=6786a186e8&amp;e=ceedd7cf80\">Galerie Vincent et moi en 2013.

", "end_date": "2024-03-31 17:00:00", "event_dates_count": 336, "facebook_url": "", "display_image_url": "https://cdn.caligram.com/uploads/event/wOX/medium/644fc6ddc7663.jpg", "photo_url": "https://cdn.caligram.com/uploads/event/wOX/medium/644fc6ddc7663.jpg", "price_currency": "CAD", "price_notes": null, "price_type": "FIXED", "public": true, "recurring": false, "short_description": null, "show_counter": null, "slug": "peaux-d-ames", "start_date": "2023-05-01 10:00:00", "subscription": { "type": null, "email": "", "phone": "", "url": "" }, "thumbnail_url": "https://cdn.caligram.com/uploads/event/wOX/thumbnail/644fc6ddc7663.jpg", "ticket_url": "https://museepop.ca/planifiez-votre-visite/horaire-et-tarifs", "title": "Peaux d'âmes", "video": null, "video_url": "", "lang": "fr", "created_at": "2023-05-01T14:04:31+00:00", "updated_at": "2023-05-01T17:31:28+00:00", "featured": false, "url": "http://culturemauricie.com/evenements/peaux-d-ames/25379", "calendar_id": 38, "status": "published", "translations": [ { "locale": "fr", "path": "http://culturemauricie.com/evenements/peaux-d-ames/25379" } ], "audiences": [ ], "author": { "user_id": 1799, "name": "Alexis Vaillant-Gamache" },

"venue": { "id": 8165, "cc_id": null, "eb_id": null, "name": "Musée POP", "slug": "musee-pop", "description": null, "other_names": "", "address": "200 Rue Laviolette Suite 1", "address2": null, "city": "Trois-Rivières", "state": null, "country": null, "zip": "G9A 6L5", "region_id": 506, "latitude": 46.3447446, "longitude": -72.5401555, "phone": "819-372-0406", "telephone": "819-372-0406", "website_url": "https://museepop.ca/", "link": "https://museepop.ca/", "business_hours": null, "created_at": "2021-10-05T18:05:28+00:00", "updated_at": "2021-10-05T18:05:28+00:00" } }`

sahalali commented 4 months ago

As per today's standup discussion, We will remove the broken eventUrls from the caligram.

sahalali commented 4 months ago

Removed event-url from while importing to CMS. Re-imported events to CMS.

For those events that are updated by other users, the event URL (breaking URLs) will not removed, as those events cannot be updated by the calligram user anymore.

tammy-culture commented 4 months ago

@sahalali

I found another problem with uploading Event Types from the acaligram user. Here is an example:

Image

https://cms.footlight.io/dashboard/657199fea5ac3d006314ea92/events/add-event/65c9c9007f90c700636644ac

The Production CMS indicates that the event type IMPROVISATION which is unfortunately not correct.

It should be HUMOUR, as is indicated on the website.

Image

https://dici.ca/evenements/christine-morency-grace-supplementaire-1

I notice a few other events like this as well. Can we fix this? And please let me know if you need more examples.

Thanks

tammy-culture commented 4 months ago

@sahalali Here is another example of the wrong event type.

Image

https://cms.footlight.io/dashboard/657199fea5ac3d006314ea92/events/add-event/65c9c7237f90c70063661682

It should be CHANSON

Image

https://dici.ca/evenements/elisapie-inuktitut

tammy-culture commented 4 months ago

@sahalali Tested the Event url removal and they are still appearing everywhere.

Image

https://cms.footlight.io/dashboard/657199fea5ac3d006314ea92/events/add-event/65c9c70b7f90c700636613ef

sahalali commented 4 months ago

@tammy-culture We had an issue with the Caligram import which caused the event tags to be not imported. It is fixed now but I have a question. https://cms.footlight.io/dashboard/657199fea5ac3d006314ea92/events/add-event/65c9c7237f90c70063661682 this event has an event tag(Chanson) as well as an event type(Spectacle). But on the client's website, we only see the tag. So should we consider saving event types moving forward?

sahalali commented 4 months ago

The issue with importing tags is fixed. Also removed breaking event URLs manually running a script.

tammy-culture commented 4 months ago

@sahalali RE: The event tag and event types. I will ask the client and get back to you.

sahalali commented 4 months ago

Now, we are now importing both event types and tags.

tammy-culture commented 4 months ago

Hi @sahalali , I just noticed that the field "Buy Tickets Link" is not be uploaded from the acaligram user.

Here is an example in the Production CMS

Screenshot 2024-02-19 at 08 48 09

https://cms.footlight.io/dashboard/657199fea5ac3d006314ea92/events/add-event/65c9c90f7f90c70063664610

Here is example on how it appears on the actual event webpage. https://dici.ca/evenements/mona-de-grenoble-1

The Buy tickets Link appears as ACHAT (the box highlighted in black).

Screenshot 2024-02-19 at 08 53 08

ANd when you click on [ACHAT] it brings you to a purchase page: https://shawinigan.ticketacces.net/fr/organisation/representations/index.cfm?EvenementID=10836&Date=&refresh=1

Can we fix this?

Let me know if you have any questions.

Many many thanks.

tammy-culture commented 4 months ago

Hi @sahalali,

Here is what I have found in my review of the acaligram user in regards to events that are missing a Buy Url Ticket Link:

(1) In Production CMS: DRAG. Here is the actual webpage link and ticket link.

(2) In Production CMS: Pierre Lapointe : Chansons hivernales. Here is the actual Webpage Link and Ticket Link

(3) In Production CMS: Sara Dufour. I cannot find the Webpage Link on the D'ici.ca calendar. I did find the actual event on the Amphitheatre Cogeco website. There are other things going wrong with this event as well. The time is not correct - it is not aligned with what is on the event webpage. Perhaps this is a bad entry in Caligram?

(4) In Production CMS: Francis Degrandpré. A-ha, the Buy Url Ticket Link does not appear on the actual calendar webpage. Instructions to purchase tickets are written in the description, so there is no error here, just a weird entry into Caligram.

(5) In Production CMS: Souldia. Another case of the Buy Url Ticket Link not appearing on the actual webpage.

I think these are edge cases and everything else looks really good.

Thank you.

sahalali commented 4 months ago
  1. The issue with DRAG is now fixed with reimporting.
  2. Pierre Lapointe : Chansons hivernales is getting updated as its modified by other user.
  3. The issue with the time was due to a glitch in the import script. Its now fixed and reuploaded.
tammy-culture commented 4 months ago

@sahalali RE: The event tag and event types. I confirmed with the client and all they want are the event tags to appear in the Production CMS Event Type. field.

Example: For Elisapie : Inuktitut, all they want is CHANSON to appear and not Improvisation. They just want one to appear.

Image

Let me know if you need more examples and many many thanks.

Tammy

sahalali commented 4 months ago

@tammy-culture I see a case where an event does not have a tag but a eventType. In that eventType is used to display the label in the wensite.

API response: https://culturemauricie.caligram.com/api/events/27779 Webpage for this event: https://dici.ca/evenements/ariane-cardinal-developpement-de-la-sphere-educative-dans-les-lieux-de-diffusion-en-art-visuel Event in CMS https://cms.footlight.io/dashboard/657199fea5ac3d006314ea92/events/add-event/65d58d0a79151d0064f30263

For this event the API response only had event_type (conference), no event tags. So there is no type for it in CMS. But when I checked their webpage, the event has a type called 'conference'. If we are considering only keeping the event_tag in the CMS, we might lose some event types.