Get video details
From UBot Studio
(Difference between revisions)
(Created page with "'''$get video details''' is a function that retrieves the details of a YouTube video using its video ID. This function provides information about a video such as its title, d...") |
(→Example) |
||
(2 intermediate revisions 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 8: | Line 6: | ||
== Return Value == | == Return Value == | ||
− | This function returns a | + | This function returns a yaml object of the video's details. |
== Example == | == Example == | ||
<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.