• wayomosqueda

    (@wayomosqueda)


    Hello AntoineH!

    First of all I would like to thank and congratulate for the incredible plugin that you have created. I can really see all the time, effort and dedication you have put into it. I will be more than willing to make a donation to help your work be rewarded.

    Turning to the doubt I have, I know that it will require intervention by me in the databases, but will there be any way in which I could connect some API of a live match results service? I would be very interested in linking it so that the process is automated without my users waiting for me to enter the result of the past games.

    Have a great weekend!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author AntoineH

    (@antoineh)

    Thanks for the compliment ??

    The only way I see to connect to an API won’t be straightforward. You would have to create some code yourself that reads the external API and inserts the values in the database. My plugin does not have any public methods that you can use to save the matches, but you could copy the relevant code from the admin page into your own code.

    Once the match data is saved you need to kick off the calculation method. As this is a potentially very long process, you need to perform this asynchronously. Maybe by using WP’s cron or a regular cronjob. Or some other way to perform background processes in wordpress.
    I have a WP-CLI function that might come in handy here (see help page). But to be honest, I haven’t really thought it through.

    More info on using cron in combination with WP:
    https://www.shawnhooper.ca/2017/08/23/wordpress-system-cron/

    Or about background processes:
    https://techslides.com/wordpress-plugin-with-background-process-queue-and-debugging

    Thread Starter wayomosqueda

    (@wayomosqueda)

    Excellent! I’ll try that and I’ll notify you if anything work. Have an excellent week!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Automatic results’ is closed to new replies.