You can now view and track API Kit on GitHub: github.com/XFtoWP/api-kit
API Kit adds endpoints, filters and sorts to the XenForo REST API. It's free, has no options, and works with any API key you give its scopes to.
API Kit works the colors out in a background job when your default style or a prefix's CSS class changes. API requests only read the saved result, so they stay fast.
Source code and developer notes are on GitHub. MIT licensed.
Télécharger V1.2.1 :
Version 1.3 Thread prefix colors :
Every thread prefix in an API result now includes
Télécharger V1.3 :
API Kit adds endpoints, filters and sorts to the XenForo REST API. It's free, has no options, and works with any API key you give its scopes to.
Thread prefixes
GET thread-prefixes/ lists every thread prefix with its title, CSS class and label color.- Every prefix in an API result, including the ones in
forums/{id}, gainscolors: the text, background and border color its label has in your default style.
API Kit works the colors out in a background job when your default style or a prefix's CSS class changes. API requests only read the saved result, so they stay fast.
User groups
GET user-groups/lists every user group with its title, display style priority, username CSS and banner CSS class.GET users/gainsuser_group_idandsecondary_group_ids[]filters. A user must be in every secondary group you list.
Thread sorts
GET threads/ gains two sorts for the forum-wide thread list:most_replies=1:threads active in the last 30 days by reply count, then everything else by latest activitymost_viewed=1:threads by view count
Setup
In Setup → API keys, give the keys that need them these scopes:apikit_thread_prefix:readforthread-prefixes/apikit_user_group:readforuser-groups/
user:read scope and member list permissions, and the thread sorts use thread:read.Requirements
XenForo 2.2 or later and PHP 7.2 or later.Source code and developer notes are on GitHub. MIT licensed.
Télécharger V1.2.1 :
Pour consulter le contenu, vous devez : Se connecter ou S'inscrire.
Version 1.3 Thread prefix colors :
Every thread prefix in an API result now includes
colors: the text, background and border color its label has in your default style. This includes the prefixes in forums/{id} and needs no extra scope.- Colors as visitors see them: they're read from your default style's compiled label CSS, including edited label styles, dark styles and custom CSS classes. Only plain color values are sent.
- No slower API requests: a background job works the colors out when your default style or a prefix's CSS class changes, and API requests only read the saved result. Until it first runs, prefixes have no
colorsfield. - 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.
Télécharger V1.3 :
Pour consulter le contenu, vous devez : Se connecter ou S'inscrire.

