Account Badges

Gets the badges that an individual account has earned. 

This will only return data if the account holder is logged in.

Learn more about APIs.

Minimum Tag

{{ _api.trails.accountBadges.template('template-key') }}

Example Tag

Get badges ordered by the badge title

{{ _api.trails.accountBadges.template('template-key').sort('badgeTitle', 'asc') }}

API Tag Parameters

instanceKey The key for the instance to get results in. If nothing is passed then the current instance will be used if this is called within the same app.

Type: String

sort Sets the layout keys and the direction to sort by. If this is not used then sortDirection and sortKey will be used if they are set.

You can target a value beyond the first level of an array by using the "dot syntax". Example: myDate.timestamp will get the 'timestamp' value within the 'myDate' array.
array('myDate' => array('timestamp' => '1393657200', 'date' => 'March 1, 2014')).

The first parameter is the attribute layout key to sort by.
The second parameter is the direction to sort by.

You can set layout keys to sort by passing the parameter multiple times.
sort('layoutKey', 'asc').sort('anotherKey', 'desc')

Type: String

Accepted Values:
asc - Ascending order (A - Z or 1 - 10)
desc - Descending order (Z - A or 10 - 1)

sort('layoutKey', 'asc')

Sort by a value beyond the first level of a multi-dimensional array
sort('myDate.timestamp', 'asc')
template Required if responseFormat is not 'data'. The template key of the template to use.

If this is not passed when it's required then nothing will be returned. In some cases by not passing this parameter you will get just the raw data back.

Type: String