Home › Forums › Welcome! › Pre-Sales Questions › Category list for rest api
- This topic has 9 replies, 2 voices, and was last updated 8 years, 10 months ago by
Support Droid.
-
AuthorPosts
-
May 17, 2017 at 7:12 pm #1285242
Nick
GuestHi there,
I was just wondering if there’s currently a built-in url to retrieve a list of all event categories via the REST API, or would I have to build one?
For example – wp-json/wp/v2/categories returns a list of post categories on a standard rest-enabled wordpress site.
Currently can get events with wp-json/tribe/events/v1/events but having no luck with wp-json/tribe/events/v1/categories
Thanks for your time!
May 18, 2017 at 2:16 pm #1285866Courtney
MemberHi Nick
Take a look at the screenshot on this post: https://theeventscalendar.com/release-the-events-calendar-4-5/. You can provide a category link to import using “Other URL”, such as our demo site: http://wpshindig.com/events/category/tech-meetups/.
The Rest API support is available in read-only format from 4.5 forward. Both sites would need to be running 4.5 or later for this to work.
Is there anything else I can do to help?
Thanks
Courtney 🙂May 18, 2017 at 4:20 pm #1285914Nick
GuestThank you for your reply Courtney,
I actually don’t need to import anything to the Events Calendar, I was just wondering if there’s a way to get a list of all of the categories in the Events Calendar Rest API.
For example – to get all of the post categories in a wordpress site the URL is example.com/wp-json/wp/v2/categories
I was just wondering if the Events Calendar had a url that would do the same thing?
Thanks again for your time.
May 19, 2017 at 6:00 am #1286211Courtney
MemberCan you try
/wp-json/tribe/events/v1/events?tribe_events_cat=15If that doesn’t meet your needs, I’m afraid we don’t have that option available at this time. We’ve only just begun to integrate the Rest API, so it’s likely that we will expand our support in future versions.
Thanks
Courtney 🙂May 19, 2017 at 6:10 am #1286219Courtney
MemberI did check with our dev crew. They shared the following information with me:
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/).
May 21, 2017 at 5:51 pm #1286949Nick
GuestHi Courtney,
thanks again for your help.
I had a look at the docs through swagger and the only GET requests it returned were for:
/doc
/events
/events/{id}It looks like there is no way to return a category list. Thanks anyway, hopefully this gets included in a future release.
May 22, 2017 at 6:36 am #1287056Courtney
MemberI believe eventually it will Nick. Until then, we’d love your input on http://tribe.uservoice.com.
Thanks
Courtney 🙂May 22, 2017 at 4:55 pm #1287379Nick
GuestThanks Courtney, I’ve just put the feature request forward!
May 23, 2017 at 7:04 am #1287627Courtney
MemberGreat! 🙂
June 14, 2017 at 9:35 am #1297846Support 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 Team -
AuthorPosts
- The topic ‘Category list for rest api’ is closed to new replies.
