Updates to the REST API

We’ve been gradually adding more functionality to our web services interface. A few changes have accumulated over the last 4-5 weeks, so it’s about time for an overview of what’s new.
Category methods: You may have noticed that we added event categories when we rolled out version 2.0 of Zvents. Events can belong to one or more categories which can be used to find events using search. The following methods let you access and use event categories through the REST interface:
/event_categories
/categories
/search
/search_for_venues
/search_within_group

Search Information: There are many optional parameters when you search on Zvents either through the front-end or through the REST API. These optional parameters all assume default values in the absence of an explicit value. For instance, if you don’t supply a value in the where field, the search is run against all future events. Until now, you would have to write some timestamping code in your client application to figure out the exact time range of the search.
To make your life easier, searches through the REST API now return a lot of relevant information in the search_info construct.
Repeating Events: We’ve also made it a lot easier for you to handle repeating events within search results. In the past, it was difficult (and in some cases impossible) to identify events within the same repeat pattern. We’ve added three features to address this issue:
series_count: This field tells you the number of events within a repeating series that match a search.
parent_id: This field identifies the ID of the parent event of the repeat series. All events with the same parent_id belong to the same series.
rec flag: Use the rec flag on a search to list the id and times of all events within the repeating series that match the search. You probably want to turn the trim flag on if you use this option, otherwise you’ll get redundant data back. The rec flag just returns the data in a format that’s easier to digest.
User methods: All user methods can now be invoked by user name. In the past, you had to supply a user id. It was always relatively easy to look up a user id, but this change saves you a little bit of time and effort.
As always, documentation can be found at http://www.zvents.com/rest


Happy hacking.
-Tyler


If you enjoyed this post, make sure you subscribe to my RSS feed!

Leave a Comment