Home › Forums › Calendar Products › Events Calendar PRO › REST API and event categories
- This topic has 4 replies, 4 voices, and was last updated 8 years, 7 months ago by
Courtney.
-
AuthorPosts
-
May 23, 2017 at 2:27 am #1287544
Gilles
ParticipantHello,
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
May 23, 2017 at 5:57 am #1287592Courtney
MemberHello 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 🙂June 14, 2017 at 9:35 am #1297837Support Droid
KeymasterHey 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 TeamSeptember 25, 2017 at 11:17 am #1354407Courtney
MemberHey 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 🙂 -
AuthorPosts
- The topic ‘REST API and event categories’ is closed to new replies.
