Skip to content

Releases

API Kit 1.3.0

Choose a tag to compare

@alexmangini alexmangini released this 10 Nov 19:19

New

  • Thread prefix colors: every thread prefix in an API result, including the ones in forums/{id}, now includes colors: the color, background_color and border_color its label has in your default style. No extra scope needed.
  • Colors as visitors see them: they're read from your default style's compiled core_labels.less and extra.less, including edited label styles, dark styles and custom CSS classes. Only plain color values are sent.

Other changes

  • A background job works the colors out when API Kit is installed or upgraded, and again when your default style or a prefix's CSS class changes. API requests only read the saved result. Until it first runs, prefixes have no colors field.
  • Changed: GET thread-prefixes/ now returns {"prefixes": [...]}, like XenForo's own list endpoints. If you read the old bare list, update your code before upgrading.
  • For developers: Kolakube\APIKit\Style\Css compiles a style's LESS templates and reads the values that apply to an element with given classes, and Kolakube\APIKit\Style\Data is a base for data built from it in the background.

Install: download Kolakube-APIKit-1.3.0.zip below, then go to Add-ons → Install/upgrade from archive in your XenForo admin. Upgrading from 1.2.1 keeps your settings.

API Kit 1.2.1

Choose a tag to compare

@alexmangini alexmangini released this 21 Oct 03:06

Fixes

  • The most_replies thread sort no longer loads every thread from the last 30 days into memory and adds an ORDER BY term for each one. It now sorts with a single expression, and the order is unchanged.
  • The forum parameter of the thread sort is marked nullable, so PHP 8.4 doesn't log a deprecation notice.
  • Secondary group IDs are compared as text in the users/ filter.

Other changes

  • Now under the MIT license. The previous LICENSE.txt only had the warranty disclaimer.
  • Renamed to API Kit, with the version code fixed to match 1.2.1, and XenForo 2.2+ and PHP 7.2+ requirements declared.
  • Added a README with every endpoint, filter, sort and API scope.

Install: download Kolakube-APIKit-1.2.1.zip below, then go to Add-ons → Install/upgrade from archive in your XenForo admin. Upgrading from 1.2 keeps your settings.