Events Made Easy Forums How do I … fetch from a REST API

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #60011
    Anonymous
    Inactive

    hi there,

    It seems that because you chose to not create a custom post type to create your events but rather use a custom database class, it’s pretty hard to fetch this information from a rest api. In fact, I haven’t seen any way to do this so far. WordPress offers extensive rest api support even for custom content created by plugins. But they need to adhere to some wordpress standards in order to register themselves to the wordpress rest api. Such as creating a custom post type and registering it with wordpress.

    An example can be found here:

    https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-rest-api-support-for-custom-content-types/

    How would one add rest api support for your plugin if it’s not using custom post types?
    Is this simply not possible? Or have you made your own API for fetching events from other places?

    I need to be able to fetch the events I created in one of my wordpress sites from another place, like for example a mobile app or other website.

    If this won’t work I’ll sadly have to go to another events plugin.

    Please help me, I can’t seem to figure this out.

    #60012
    Franky
    Keymaster

    Eme doesn’t offer this functionality. Although all events are reachable (basic) through ical feeds. And maybe using the available api function can help you:
    https://www.e-dynamics.be/wordpress/category/documentation/5-template-api/

    #60013
    Anonymous
    Inactive

    Can you display all events on a single page, with all information of these events?
    If so I’ll just write a web scraper or open that page within an iframe and use that instead of a rest api with json.

    ical feeds don’t have all the information of the event, for example the google maps and contact form aren’t included. Or even the entire description of the event.

    #60014
    Franky
    Keymaster

    Using [eme_events] on a regular page will show you your future events. By default only 10 are shown, change that using the limit option (see https://www.e-dynamics.be/wordpress/category/documentation/6-shortcodes/eme_events/ )
    Concerning how each event is displayed, you can change that via the template option. The placeholders you can use in your template can be found here: https://www.e-dynamics.be/wordpress/category/documentation/7-placeholders/7-2-events/

    One warning: the rsvp form is currently not meant to work if you show multiple forms on one page (reason being that the form can be changed via ajax and dynamic fields can be added based on input conditions, and I just haven’t found the time to make the form id’s random and work with those random id’s).

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top