Template Instance
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/8/?format=api
https://yadg.cc/api/v2/templates/8/?format=api", "id": 8, "owner": "Slack", "ownedByYou": false, "name": "Waffles (Tracks only)", "nameFormatted": "Waffles (Tracks only)", "code": "{% if data.discs.length == 1 %}[size=3][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=3][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": {} }{ "url": "