How do I Configure CERN Indico Feeds?

Submitted by jyde on Fri, 03/25/2022 - 10:26

The CERN Indico Events and CERN Indico Feeds modules are offered as part of the CERN Drupal Distribution and allows you to import feeds from Indico directly onto your Drupal website(s) and display the associated events. The CERN Indico Events module introduces a dedicated content type and views for Indico feeds, and the CERN Indico Feeds module features functionality to integrate against the Indico API (see more at https://docs.getindico.io/en/stable/http-api/).

Configuring CERN Indico Feeds

0. Ensure that both the CERN Indico Events and CERN Indico Feeds modules are installed and enabled.

1. Head to Structure and select Feed types.

feeds types

2. Select Indico Feed and click Edit.

Indico feeds

This page contains general settings for the CERN Indico Feed type.

  • Settings defines the import period (i.e. the frequency with which feeds should be updated). The default value is six hours and should be sufficient for the vast majority of websites. If you require very frequent updates (i.e. every hour or several times an hour), consider linking users directly to Indico instead.
  • Fetcher settings provides an interface to manage authentication with the Indico API.
  • Processor settings provides an interface to manage how existing content should be updated, what happens with previously imported items, when content should expire, and who should be the owner of the created items. The default settings should meet the requirements for the vast majority of websites. Only advanced users should change processor settings.

3. Select Fetcher settings.

fetcher settings

On here, we need to update the API Key and Secret Key. This step needs to be completed once.

4. Head to https://indico.cern.ch/user/api/ and sign in. Click Create API key.

create API key

This will load the following page. Do not share your keys with anyone!

token and secret

5. Copy the Token and paste it as your API Key.

Copy the Secret and paste it as your Secret Key.

prepared

6. Click Save feed type. Your website can now make authenticated calls to the Indico service.

If you encounter any issues following the above steps, please reach out via the community forums.

Creating a new Feed

In order to create a new feed and start pulling events from Indico, follow the below steps.

Kindly note that the CERN Indico Events content type does not include all the fields from Indico. If you require a field that is not included, you must add it manually in the content type and otherwise map it to the Indico field in the Mapping section of the feed. This is done by going to Structure → Feed types → Edit Indico Feed → Mapping tab.

1. Go to Content and click Feeds.

Access Content and then Feeds

2. Click Add feed.

Add feed

3. Add information describing your feed.

Adding feed
  • Title is the title of your feed.
  • Categories is the list of Indico category ids from which you wish to pull events. If, for instance, you put category id 1279 (Schools), the module will pull all events from the child categories under it (namely CERN Official Schools and Other Schools). In the event that you are only interested in a specific category, please put the specific id. There is no limitation on the number of categories from which the module can pull.
  • Start date is the date from which the module should start pulling events from Indico.
  • End date is the latest date from which the module should pull events from Indico.
  • Room should be left empty unless strictly necessary.
  • Retrieve only public events should be ticked by default. If you require private events from the Indico categories, untick this accordingly. Kindly note that private events will only be visible to users who have access to see them in the first place and have signed in on your website. Additionally, if you require private events, please ensure that the account from which you generated API keys has access to the events.
  • Import options should be left unchanged. Unticking this option will stop the pulling of events.
  • Authoring information should be left unchanged.

Once done, click Save and import.

Imported events can now be displayed using Grid of event boxes, Collisions of events, or Countdown to next event content types.

If you encounter any issues following the above steps, please reach out via the community forums.