Get video details
From UBot Studio
(Difference between revisions)
(→Return Value) |
(→Example) |
||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
'''$get video details''' is a function that retrieves the details of a YouTube video using its video ID. | '''$get video details''' is a function that retrieves the details of a YouTube video using its video ID. | ||
− | |||
− | |||
== Parameters == | == Parameters == | ||
Line 13: | Line 11: | ||
<pre> | <pre> | ||
+ | ui console view | ||
connect to youtube("path/to/your/client secret.json") | connect to youtube("path/to/your/client secret.json") | ||
− | + | log object($get video details("dQw4w9WgXcQ")) | |
</pre> | </pre> | ||
The script above connects to YouTube using the client secret file "client secret.json". Please replace "path/to/your/" with the actual path to your client secret file. | The script above connects to YouTube using the client secret file "client secret.json". Please replace "path/to/your/" with the actual path to your client secret file. | ||
− | It uses the | + | It uses the '''$get video details''' function to retrieve the details of the YouTube video with the ID "dQw4w9WgXcQ", and logs it to the console. |
− | + | ||
− | + | ||
− | + | ||
− | + |
Latest revision as of 16:00, 4 July 2023
$get video details is a function that retrieves the details of a YouTube video using its video ID.
[edit] Parameters
Video Id: This is the unique identifier for the YouTube video whose details are to be retrieved. The video ID can be found in the video's URL.
[edit] Return Value
This function returns a yaml object of the video's details.
[edit] Example
ui console view connect to youtube("path/to/your/client secret.json") log object($get video details("dQw4w9WgXcQ"))
The script above connects to YouTube using the client secret file "client secret.json". Please replace "path/to/your/" with the actual path to your client secret file.
It uses the $get video details function to retrieve the details of the YouTube video with the ID "dQw4w9WgXcQ", and logs it to the console.