This returns a paginated list of all templates that are available to you.

By default a page contains 20 entries. To override this value append the GET parameter page_size with the desired number of entries per page (max 100).

Note: To get all your templates including your private ones you must authenticate yourself as described in the API root.

GET /api/v2/templates/2/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "url": "https://yadg.cc/api/v2/templates/2/?format=api",
    "id": 2,
    "owner": "Slack",
    "ownedByYou": false,
    "name": "Gazelle: Generic Header",
    "nameFormatted": "Gazelle: Generic Header",
    "code": "[size=5][b]{% set main_artists=data.artists|artistsbytype(\"main\") %}{% if main_artists.length == 1 && main_artists[0].isVarious %}Various Artists{% else %}{{ main_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}{% endif %}{% set featured_artists=data.artists|artistsbytype(\"guest\") %}{% if featured_artists.length > 0 %} feat. {{ featured_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}{% endif %} – {{ data.title }}[/b][/size]\r\n\r\n{% if data.labelIds.length > 0 %}[b]Label/Cat#:[/b] {% for labelId in data.labelIds %}[url={{ gazelle_url }}/torrents.php?recordlabel={{ labelId.label|url_encode }}]{{ labelId.label }}[/url]{% if labelId.catalogueNrs.length > 0 %} – {{ labelId.catalogueNrs|join(\" or \") }}{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.releaseEvents.length > 0 %}{% set releaseEvent=data.releaseEvents|first %}{% if releaseEvent.country %}[b]Country:[/b] {{ releaseEvent.country }}\r\n{% endif %}{% if releaseEvent.date %}[b]Year:[/b] {{ releaseEvent.date }}\r\n{% endif %}{% endif %}{% if data.genres.length > 0 %}[b]Genre:[/b] {% for g in data.genres %}[url={{ gazelle_url }}/torrents.php?taglist={{ g|replace(\"\\s+\",'.','g')|url_encode }}]{{ g }}[/url]{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.styles.length > 0  %}[b]Style:[/b] {% for s in data.styles %}[url={{ gazelle_url }}/torrents.php?taglist={{ s|replace(\"\\s+\",'.','g')|url_encode }}]{{ s }}[/url]{% if not loop.last %}, {% endif %}{% endfor %}\r\n{% endif %}{% if data.format %}[b]Format:[/b] {{ data.format }}\r\n{% endif %}",
    "isUtility": true,
    "default": false,
    "dependencies": {}
}