MEC event API addon allows easy copying of events, exporting scripts, and downloading JSON files. It supports events from WordPress and any web application on any platform. It includes Single Events, shortcodes, immediate activation after installation, and domain management.
Requirements
MEC Lite/Pro
Latest Version
1.2.2
Last Updated
2023-10-25 15:28:13
Event API Addon Preparation
Installation
In the first step, please make sure to activate MEC and the Event API Addon.
Read Also:
Using Event API Addon
You can use Event API Addon on both Shortcodes and Single event pages to display them on another web application.
Event API Addon Shortcode
To use the event API on the shortcodes, please navigate to the shortcodes page of MEC. Then, click “Create API” on your chosen shortcode.
Event API Addon Single Event
To use the event API on any Single Event, please navigate to the All Events page of MEC. Then, click “Create API” on your chosen Event.
By clicking Create API, you will be directed to a page where you can receive your API.
The left side provides access to domains that display events. To manage this, enter the specific domain(s) or set API for all domains.
To remove an API, select the domain(s) or All Domains and click the trash icon. This will remove the API from all the added domains. Click the Generate Button once you’re done.
There are three fields on the right side. The first one contains a script that you can copy to the clipboard. You can use this script to display any content you want, but you need to specify the domains where you want to display it. The second field contains the same content in JSON format, which you can use to receive different content for your web application.
You can see samples of the used API below:
To ensure your script is functional, make sure to verify two things:
The script needs to be enabled on all domains or a specific one.
Contact your host provider and ensure the ability to create iframes on your website is enabled.
When you install the Event API Addon, you can access settings in MEC Settings > Settings > Event API. From there, you can include your source webiste header and footer in the destination website and limit the number of events in the shortcode output.
Please note that if you are using any of the website loading speed optimization plugins, these plugins might be the reason for not loading the external script links on your web pages.
Since the “Event API Addon” has a script for showing your events, you need to exclude “external links” in those plugins so they won’t get ignored and can work properly.