Okay
  Public Ticket #2830210
Developer documentation
Closed

Comments

  •  2
    Scott Lewis started the conversation

    Is there any developer documentation for Amelia? I'd like to be able to access the data to create different ways of presenting it. Since you don't store services, packages and events as posts with postmeta data in WordPress, I'd need to access your data directly but I don't know if you have a documented API for that or if I need to make direct SQL access. This is read-only as I just need to present things like a weekly view of upcoming classes (that are services, not events, because we need rolling enrollment so I can't use your calendar shortcode). 

  • [deleted] replied

    Hi Scott

    Thank you for reaching out to us.

    We have API Routes for the Amelia app, but most of them are protected depends on of the permissions that is set in WordPress Accounts. You can check those API Routes in this file ../wp-content/plugins/ameliabooking/src/Infrastructure/Routes/Routes.php

    At the moment we have some JavaScript hooks that are triggered depending on the view:

    window.beforeAddToCalendarLoaded()
    window.beforeBookingLoaded()
    window.beforeSearchLoaded()
    window.beforeSearchFiltered()
    window.afterSearchFiltered()
    window.beforeConfirmedBooking()
    window.beforeCatalogLoaded()
    window.afterSelectCatalogCategory(object_category)
    window.beforeCatalogCategoryLoaded(object_category)
    window.beforeCatalogServiceLoaded(object_category, object_service)
    window.afterSearchActivateService(object_appointment, object_serviceActive)
    window.afterSearchGoToSecondStep(object_appointment, object_serviceActive)
    window.afterBookingSelectDateAndTime(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.afterBookingSelectService(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.beforeConfirmBookingLoaded(object_appointment, object_service, object_provider, object_location)
    window.afterConfirmBooking(object_appointment, object_service, object_provider, object_location)

    JS files are modified (minimized) in public version of plugin (in our development environment is accessible), but unfortunately I can not send you our source code because that is the policy of our company.

    All those files that have extension .vue are compressed and minimized in JS files that is very hard and not recommended modifying. So in order to add some other features you can extract the js and customise it.

    You can find an official documentation here:

    https://wpamelia.com/documentation/

    However, we don't have a separate API documentation at the moment.