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/776/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "url": "https://yadg.cc/api/v2/templates/776/?format=api",
    "id": 776,
    "owner": "Slack",
    "ownedByYou": false,
    "name": "D3Si",
    "nameFormatted": "D3Si",
    "code": "{% set gazelle_url=\"https://d3si.net\" %}[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 %}\r\n{% if data.discs.length == 1 %}[size=4][b]Tracklist[/b][/size]\r\n{% endif %}{% for disc in data.discs %}{% if data.discs.length > 1 %}{% if not loop.first %}\r\n\r\n{% endif %}[size=4][b]Disc {{ disc.number }}{% if disc.title %}: [i]{{ disc.title }}[/i]{% endif %}[/b]{% if data.discs.length > 1 %}{% set disc_length=0 %}{% for track in disc.tracks %}{% if track.length %}{% set disc_length=disc_length+track.length %}{% endif %}{% endfor %}{% if disc_length > 0 %} ({{ disc_length|formatseconds(true) }}){% endif %}{% endif %}[/size]\r\n{% endif %}{% for track in disc.tracks %}[b]{{ track.number }}{% if track.number|isdigit %}.[/b]{% else %}[/b] –{% endif %}{% set main_track_artists=track.artists|artistsbytype(\"main\") %}{% if main_track_artists.length > 0 %} {{ main_track_artists|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }} –{% endif %} {{ track.title }}{% set feature=track.artists|artistsbytype(\"guest\") %}{% if feature.length > 0 %} (feat. {{ feature|wrap(\"[artist]%s[/artist]\",\", \", \" & \") }}){% endif %}{% if track.length %} [i]({{ track.length|formatseconds(true) }})[/i]{% endif %}{% if not loop.last %}\r\n{% endif %}{% endfor %}{% endfor %}{% set total_length=0 %}{% for disc in data.discs %}{% for track in disc.tracks %}{% if track.length %}{% set total_length=total_length+track.length %}{% endif %}{% endfor %}{% endfor %}{% if total_length > 0 %}\r\n\r\n[b]Total length:[/b] {{ total_length|formatseconds(true) }}{% endif %}{% if data.url %}\r\n\r\nMore information: [url]{{ data.url }}[/url]{% endif %}",
    "isUtility": false,
    "default": false,
    "dependencies": {}
}