Abilities

Get Group Experience Levels

lh-user-experience-taxonomy/get-group-experience-levels Read-only Idempotent

Returns the experience level of every member of one or more BuddyPress groups, with a count of members at each level. Give up to 100 group IDs. Each group comes back with its name, member_count, counts (one entry per level in level order, every level listed even at 0, plus no_level for members with none) and members (user ID, display name, group roles and level). Confirmed members only; banned members are left out unless include_banned is true, and spam and deleted accounts are always left out. A group that does not exist comes back with error not_found instead of failing the call. For one member's experience text use get-user-experience. Requires list_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
group_idsarray of integerYesThe BuddyPress groups to report on. At most 100.
include_bannedbooleanNofalseAlso include members banned from the group. Default false.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.

Get User Experience

lh-user-experience-taxonomy/get-user-experience Read-only Idempotent

Returns users' own description of their playing experience and their experience level, for up to 100 users per call. For each user: experience_text, the free-form text they entered (the Experience Description profile field, stored as the lh_uet-text user option); level, their experience level term (name is the level number, label the level in words), empty when none is set; and updated, when their experience was last updated (ISO 8601), empty when never recorded. A user ID that does not exist comes back with error not_found instead of failing the call. Use set-user-experience-level to store a level. Requires list_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
user_idsarray of integerYesThe users to look up. At most 100.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.

Set User Experience Level

lh-user-experience-taxonomy/set-user-experience-level Idempotent

Sets or clears one user's experience level and returns the level before and after. level is the level number (term name, e.g. 4), its slug or its term ID; an empty string removes the level. Any other level the user held is replaced, so a user holds at most one. The user's experience text is not changed, and neither is their last-updated date unless touch_updated is true, since that date records when the member last described their experience. An unknown level fails with the valid levels listed. Use get-user-experience to read levels. Requires edit_users. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
user_idintegerYesThe user whose level to set.
levelstringYesThe level number (e.g. 4), slug or term ID. Empty string to remove the level.
touch_updatedbooleanNofalseAlso set the last-updated date to now. Default false.
task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.