REST API and event categories

Home Forums Calendar Products Events Calendar PRO REST API and event categories

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1287544
    Gilles
    Participant

    Hello,

    I use the following php code to use regular categories with tribe events:

    // Make events support regular categories
    add_action( 'init', 'my_wpa_categories_for_events' );
    function my_wpa_categories_for_events(){
    register_taxonomy_for_object_type( 'category', 'tribe_events' );
    }

    Now I am trying to query events through the RESP API and filter by category. But the REST API code only uses the tribe_events_cat taxonomy:

    protected function parse_categories( WP_REST_Request $request ) {
    return $this->parse_terms( $request, 'categories', Tribe__Events__Main::TAXONOMY );
    }

    It would be nice to either have a filter on Tribe__Events__Main::TAXONOMY in this function, or add regular categories query support some other way.

    Thank you

    #1287592
    Courtney
    Member

    Hello Gilles

    Unfortunately at this time we do not support categories with the Rest-API. However, we are planning to expand our support for the Rest-API in future releases. We’d love your input on our suggestion site: https://tribe.uservoice.com/forums/195723-feature-ideas/suggestions/19364770-make-categories-available-via-the-rest-api.

    You can find the ones we support directly via wp-json/tribe/events/v1/doc (which you can in turn plug into http://petstore.swagger.io/.

    Is there anything else I can help you with at this time?

    Thanks
    Courtney 🙂

    #1297837
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    #1354407
    Courtney
    Member

    Hey there

    Just posting a quick update that we’ve just launched The Events Calendar – Full REST Support. You can read the release notes at https://theeventscalendar.com/release-events-calendar-full-rest-support/.

    We also published a helpful guide: Introduction to The Events Calendar REST API https://theeventscalendar.com/knowledgebase/introduction-events-calendar-rest-api/ .

    We’re excited to provide this functionality for you.

    Thanks
    Courtney 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘REST API and event categories’ is closed to new replies.