Skip to main content
Events Calendar

All Category Counts API

This API returns a list of category id's with their corresponding names and the number of events for the time period specified, which cost equal to or less than the price specified. This list includes ALL categories.

Location

https://calendar.byu.edu/api/Events

Example: https://calendar.byu.edu/api/AllCategoryCounts?event[min][date]=2017-04-01&event[max][date]=2017-04-30&price=20

Parameters

ParameterDescription
event[min][date]The starting date of the time period (in the format yyyy-mm-dd).
event[max][date]The ending date of the time period (in the format yyyy-mm-dd).
price(Optional) The max price. Provide an integer or decimal. Free events and events without tickets will always be included.

Return Value

XML Example

By default, XML is returned:

https://calendar.byu.edu/api/AllCategoryCounts?event[min][date]=2017-04-01&event[max][date]=2017-04-30&price=20

You can also specify .xml in the url:

https://calendar.byu.edu/api/AllCategoryCounts.xml?event[min][date]=2017-04-01&event[max][date]=2017-04-30&price=20

allcatcountsxml.png

JSON Example

https://calendar.byu.edu/api/AllCategoryCounts.json?event[min][date]=2017-04-01&event[max][date]=2017-04-30&price=20

allcatcountsjson.png

Changes to this API

The CategoryCounts API used to include all categories. Now, the CategoryCounts API includes only the main categories. This API lists all categories - main categories, department categories, and tags, as well as a 'Featured on the Homepage' tag.

Old ValueNew Value
The wrapper of each category was 'CategoryCountViewModel'.The wrapper of each individual category is now 'item'.

New Values

New ValueDescription
CategoryNameThe name of the category.
CategoryTypeIdThe id of the category type.
CategoryTypeThe name of the category type. This could be 'category', 'tags', 'internal category' (or department), or 'BYU Homepage'.