Template:YouTube data display: Difference between revisions

From LudoWiki
No edit summary
No edit summary
Line 5: Line 5:
</noinclude><includeonly>{{#get_web_data:url=https://youtube.googleapis.com/youtube/v3/videos?part=snippet%2CcontentDetails%2Cstatistics&id={{{YouTube video ID|}}}&key=AIzaSyC-zQp-SoOYbKh64GrNhBK5D3g7H9oX7Zs|format=json}}{{#widget:YouTube|id={{{YouTube video ID|}}}|width=100%}}
</noinclude><includeonly>{{#get_web_data:url=https://youtube.googleapis.com/youtube/v3/videos?part=snippet%2CcontentDetails%2Cstatistics&id={{{YouTube video ID|}}}&key=AIzaSyC-zQp-SoOYbKh64GrNhBK5D3g7H9oX7Zs|format=json}}{{#widget:YouTube|id={{{YouTube video ID|}}}|width=100%}}
== [[Video title::{{{Video title|{{#external_value:title}}}}}]] ==
== [[Video title::{{{Video title|{{#external_value:title}}}}}]] ==
&#x1F441; Views: [[Views::{{#external_value:viewcount}}]] /// &#x2764; Likes: {{#external_value:likecount}} /// &#x1F5E9; Comments: {{#external_value:commentcount}} /// &#x1F4C5; Date: {{#time:d F Y|{{#external_value:publishedat}}}} /// &#x23F1; Duration: {{#replace:{{#replace:{{#sub:{{#external_value:duration}}|2|-1}}|M|:}}|H|:}}


{| class="ludotable" style="margin: auto; font-size: medium;"
{{#formlink:form=YouTube video page|link text=Edit data with form|link type=|target={{PAGENAME}}}}
!colspan="3"|  {{#set: YouTube video ID={{{YouTube video ID|}}} }}
|-
| &#x1F441; Views: [[Views::{{#external_value:viewcount}}]]
| &#x2764; Likes: {{#external_value:likecount}}
| &#x1F5E9; Comments: {{#external_value:commentcount}}
|-
!colspan="3"|
|-
| &#x1F4C5; Date: {{#time:d F Y|{{#external_value:publishedat}}}}
| &#x23F1; Duration: {{#replace:{{#replace:{{#sub:{{#external_value:duration}}|2|-1}}|M|:}}|H|:}}
|
|}{{#formlink:form=YouTube video page|link text=Edit data with form|link type=|target={{PAGENAME}}}}
__NOEDITSECTION__
__NOEDITSECTION__
</includeonly>
</includeonly>

Revision as of 15:03, 6 February 2023

This is the "YouTubeDataDisplay" template.

Edit the page to see the template text.