• Resolved ssvtom

    (@ssvtom)


    When I am creating events via REST-API, the event that is generated will get the old style event look. If I create events via WP backend, the new style is automatically applied. If I open one of the events, that got created via REST from within WP Backend, it immediately gets changed into the new look (even before/without saving any changes).

    Examples (both events were created via REST):

    https://ssv-volleyball.de/event/1-damen-vs-sg-schwarzbachtal-2/ (old style)
    https://ssv-volleyball.de/event/4-damen-vs-djk-hockenheim/ (new style)

    As said, the second event was just opened for editing.

    My question: is there a way to get events in the “new style” via REST?

    I’m still on WP 5.9.4, The Events Calendar 5.16.4

    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Abz

    (@abzlevelup)

    Hi @ssvtom, apologies for the delay here. That’s a good question. Our API is built on top of WordPress Rest API if you upgrade to 6.0 you be using the updated API as well. There shouldn’t be much of a difference since we do not have any updates for our Rest API yet. For now, there’s no workaround to get the new style with the version you’re using.

    Let me know if that helps.

    Best,
    Abz

    Thread Starter ssvtom

    (@ssvtom)

    Oh, thanks.

    Will test the upgrade on my staging system and see how events, that are created via REST look like afterwards.

    I’ll keep you posted…

    Plugin Support Abz

    (@abzlevelup)

    Hi @ssvtom, awesome. Yes, please do test it out on a staging site to be safe. Keep us posted!

    Have a great day.

    Best,
    Abz

    Thread Starter ssvtom

    (@ssvtom)

    Did the TEC 6.0.2 upgrade on my staging system.

    Still, events created via REST API get “old style” look. Interesting to see, that the description field is left empty during the creation. As previously said, if I just open the generated event in the Editor, it immediately gets “updated” to the new style. Afterwards the description field contains some (HTML) content.

    BTW, I’m using httpie.io as REST client for testing:

    http –verify no –auth user:pass https://ssv-volleyball.de/wp-json/tribe/events/v1/events title=”Testevent” start_date=”2022-10-23 16:00:00″ end_date=”2022-10-23 18:00:00″ status=publish categories:='[12]’ venue:=76

    resulting in the following JSON being sent to WP

    {
        "categories": [
            12
        ],
        "end_date": "2022-10-23 18:00:00",
        "start_date": "2022-10-23 16:00:00",
        "status": "publish",
        "title": "Testevent",
        "venue": 76
    }

    Any pointers welcome.

    Plugin Support Abz

    (@abzlevelup)

    Hi @ssvtom, thanks for getting back to me here. I’m not that familiar with httpie.io, let me reach out to our team and ask for pointers. I’d get back to you as soon as I hear from them.

    Hang in there.

    Best,
    Abz

    The command is equivalent to the curl command

    curl —-insecure —-user user:pass -X POST —-header “Content-Type: application/json” —-data ‘{…}’ https://ssv-volleyball.de/wp-json/tribe/events/v1/events
    Where is

    • —-insecure to accept a self-signed HTTPS certificate
    • —-user for basic authentication
    • —-data for the POST body being set to the json object which is given above

    I hope this helps ??

    Plugin Support Abz

    (@abzlevelup)

    Hi @maxm123, this is helpful. Hmmm, apparently it is not being applied to the events created via REST API.

    Appreciate you sharing more information. This is definitely helpful, sharing this with the team.

    Best,
    Abz

    Thread Starter ssvtom

    (@ssvtom)

    Any update on this issue you can share?


    Tom

    Plugin Support Abz

    (@abzlevelup)

    Hi @ssvtom, apologies I have not heard back from our devs. My initial thoughts here is that we have some code that does the conversion, but apparently it is not being applied to the events created via REST API. I am not entirely sure if it is due to the httpie.io.

    I’d follow up on this and I’d get back to you whenever I hear from there.

    Thanks for your patience here. Hang in there.

    Best,
    Abz

    Plugin Support Abz

    (@abzlevelup)

    Hi @ssvtom, it seems like my initial thoughts were correct. It seems like it is not working with httpie.io — it would be good to try out different provider if there are any.

    Appreciate your patience here. Please do not hesitate to bump a new ticket on our way.

    Best,
    Abz

    Plugin Support Darian

    (@d0153)

    Hi @ssvtom

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Issue with REST-API’ is closed to new replies.