Enables scripted content fragments to use achievements
Properties
| Name | Access | Type | Description |
|---|---|---|---|
| Current | Read | Achievement | Contextual achievement |
Methods
Create
Create an achievement
Velocity
#set($achievementResponse = $core_v2_achievement.Create($title, $criteria, $badgeIconName, "%{ AutomationConfiguration = $automationConfigurationArg, AutomationId = $automationIdArg, BadgeIconData = $badgeIconDataArg, BadgeIconUploadContext = $badgeIconUploadContextArg, Enabled = $enabledArg }"))JavaScript
var achievementResponse = core_v2_achievement.Create(title, criteria, badgeIconName, { AutomationConfiguration: automationConfigurationArg, AutomationId: automationIdArg, BadgeIconData: badgeIconDataArg, BadgeIconUploadContext: badgeIconUploadContextArg, Enabled: enabledArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| title | String | Title | Required | ||
| criteria | String | Criteria | Required | ||
| badgeIconName | String | Badge Icon Name | Required | ||
| options | Options | Set of optional parameters including: | Required | ||
| AutomationConfiguration | | Querystring encoded string, Querystring entity, or Dictionary of configuration values used by the selected automation for this achievement. | Optional | ||
| AutomationId | Guid | Identifies the ID of the automation used to automatically award/revoke this achievement. | Optional | ||
| BadgeIconData | Array of Byte | Either BadgeIconData, BadgeIconUploadContext is required. OBSOLETE in 12: Use BadgeIconUploadContext instead. | Optional | ||
| BadgeIconUploadContext | String | Either BadgeIconData, BadgeIconUploadContext is required. | Optional | ||
| Enabled | Boolean | Enabled state of the achievement | Optional |
Returns
Delete
Delete achievement by its Id
Velocity
#set($additionalInfoResponse = $core_v2_achievement.Delete($achievementId))
JavaScript
var additionalInfoResponse = core_v2_achievement.Delete(achievementId);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| achievementId | Guid | Achievement Id | Required |
Returns
Get
Gets an achievement by its Id
Velocity
#set($achievementResponse = $core_v2_achievement.Get($achievementId))
JavaScript
var achievementResponse = core_v2_achievement.Get(achievementId);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| achievementId | Guid | Achievement Id | Required |
Returns
List
List Overload 1
List achievements
Velocity
#set($pagedListResponse = $core_v2_achievement.List())
JavaScript
var pagedListResponse = core_v2_achievement.List();
List Overload 2
List achievements
Velocity
#set($pagedListResponse = $core_v2_achievement.List("%{ Enabled = $enabledArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortBy = $sortByArg, SortOrder = $sortOrderArg }"))JavaScript
var pagedListResponse = core_v2_achievement.List({ Enabled: enabledArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, SortBy: sortByArg, SortOrder: sortOrderArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| options | Options | Set of optional parameters including: | Required | ||
| Enabled | Boolean | Enabled state of the achievement | Optional | ||
| PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
| PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 | |
| SortBy | String | Sort mechanism | Optional | Title | DateCreated, Title |
| SortOrder | String | Sort order | Optional | Ascending | Ascending, Descending |
Returns
Update
Update an achievement
Velocity
#set($achievementResponse = $core_v2_achievement.Update($id, "%{ AutomationConfiguration = $automationConfigurationArg, AutomationId = $automationIdArg, BadgeIconData = $badgeIconDataArg, BadgeIconName = $badgeIconNameArg, BadgeIconUploadContext = $badgeIconUploadContextArg, Criteria = $criteriaArg, Enabled = $enabledArg, RemoveAutomation = $removeAutomationArg, Title = $titleArg }"))JavaScript
var achievementResponse = core_v2_achievement.Update(id, { AutomationConfiguration: automationConfigurationArg, AutomationId: automationIdArg, BadgeIconData: badgeIconDataArg, BadgeIconName: badgeIconNameArg, BadgeIconUploadContext: badgeIconUploadContextArg, Criteria: criteriaArg, Enabled: enabledArg, RemoveAutomation: removeAutomationArg, Title: titleArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Guid | Id | Required | ||
| options | Options | Set of optional parameters including: | Required | ||
| AutomationConfiguration | | Querystring encoded string, Querystring entity, or Dictionary of configuration values used by the selected automation for this achievement. | Optional | ||
| AutomationId | Guid | Identifies the ID of the automation used to automatically award/revoke this achievement. | Optional | ||
| BadgeIconData | Array of Byte | When updating a badge icon BadgeIconName and either BadgeIconData, BadgeIconUploadContext are required. OBSOLETE in 12: Use BadgeIconUploadContext instead. | Optional | ||
| BadgeIconName | String | When updating a badge icon BadgeIconName and either BadgeIconData, BadgeIconUploadContext are required. | Optional | ||
| BadgeIconUploadContext | String | When updating a badge icon BadgeIconName and either BadgeIconData, BadgeIconUploadContext are required. | Optional | ||
| Criteria | String | Criteria to earn the achievement | Optional | ||
| Enabled | Boolean | Enabled state of the achievement | Optional | ||
| RemoveAutomation | Boolean | Removes the automation used by this achievement. | Optional | ||
| Title | String | Title of the achievement | Optional |