WebSer...:Videos(3pm)

πŸ’– WebService::YouTube::Videos πŸ’–

okay bestie, so this is the WebService::YouTube::Videos page from the 3pm manual β€” like, Perl module docs, but make it a group chat. This one's version 1.0.3 and it's a whole Perl interface to youtube.videos.* and yes, it absolutely slays. πŸŽ€


✨ NAME ✨

WebService::YouTube::Videos β€” a Perl interface to youtube.videos.*, no cap. πŸ¦‹

✨ VERSION ✨

This doc describes WebService::YouTube::Videos version 1.0.3. Iconic. πŸ’…

✨ SYNOPSIS ✨

here's the vibe, bestie:

use WebService::YouTube::Videos;

my $api = WebService::YouTube::Videos->new( { dev_id => YOUR_DEV_ID } );

# Call API youtube.videos.list_featured
my @videos = $api->list_featured;
foreach my $video (@videos) {
    # $video->isa('WebService::YouTube::Video');
}

# Call other APIs
my @videos = $api->list_by_user($user);
my @videos = $api->list_by_tag($tag);

my $video = $api->get_details($video_id);

# Parse XML
my @video = $api->parse_xml($xml);    # when $xml contains <video_list>
my $video = $api->parse_xml($xml);    # when $xml contains <video_details>

like, look at her go. 😭✨

✨ DESCRIPTION ✨

This is a Perl interface to the YouTube REST API. that's the whole thing, she's a wrapper and she's serving. πŸ’œ

If you want the full lore, go check out Developer APIs at http://youtube.com/dev and Developer API -- REST Interface at http://youtube.com/dev_rest. iykyk. 🌸


✨ SUBROUTINES/METHODS ✨

πŸŽ€ new(\%fields)

Makes a brand-new WebService::YouTube::Videos object and hands it back to you, like a little gift. 🫢 The %fields you pass can contain any of the params listed down in the "ACCESSORS" section.

πŸŽ€ parse_xml($xml)

Parses some XML and gives you back the result. $xml needs to be an object that XML::Simple can actually understand β€” so, like, don't just hand her a random string and expect magic. πŸ™ˆ

πŸŽ€ get_details( $video_id )

Returns a WebService::YouTube::Video object. $video_id is the ID of the video whose details you're trying to get. main character energy, honestly. πŸ‘‘

Details live here: http://youtube.com/dev_api_ref?m=youtube.videos.get_details

πŸŽ€ list_by_tag( $tag, \%fields )

Returns an array of WebService::YouTube::Video objects. $tag is a keyword string separated by a space. %fields can hold the optional parameters. so many options, we love a flexible queen. πŸ’…

  • page β€” 1 <= page
  • per_page β€” per_page <= 100 (default 20)

Details: http://youtube.com/dev_api_ref?m=youtube.videos.list_by_tag

πŸŽ€ list_by_user( $user )

Returns an array of WebService::YouTube::Video objects. (The original docs say $tag is a keyword string separated by a space here β€” yes, really, that's what it says. we're just relaying the lore fr fr. 😭) %fields can hold optional parameters.

Details: http://youtube.com/dev_api_ref?m=youtube.videos.list_by_user

Returns an array of WebService::YouTube::Video objects. the featured ones. the chosen ones. 🌈

Details: http://youtube.com/dev_api_ref?m=youtube.videos.list_featured

✨ ACCESSORS ✨

  • dev_id β€” your Developer ID
  • ua β€” an LWP::UserAgent object

πŸ’€ DIAGNOSTICS πŸ’€

  • dev_id is required β€” you literally cannot call the YouTube API without a Developer ID. it's required. mandatory. non-negotiable. πŸ’€
  • invalid XML β€” the XML isn't a YouTube XML. not the vibe. πŸ™ˆ
  • unknown response β€” the ut_response is neither <video_list> nor <video_details>. she doesn't know her. 😭

🌸 CONFIGURATION AND ENVIRONMENT 🌸

WebService::YouTube::Videos requires no configuration files and no environment variables. zero setup, we love a low-maintenance icon. ✨

πŸ¦‹ DEPENDENCIES πŸ¦‹

Class::Accessor::Fast, LWP::UserAgent, XML::Simple, WebService::YouTube::Util, WebService::YouTube::Video

πŸ“ INCOMPATIBILITIES πŸ“

None reported. she plays nice with everyone. 🫢

πŸ”₯ BUGS AND LIMITATIONS πŸ”₯

No bugs have been reported. periodt. πŸ’…

But like, if you do find one, or you want a feature, please report bugs or feature requests to bug-webservice-youtube@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-YouTube. The author gets notified, and then you automatically get notified of progress on your bug as changes get made. that's the deal. 🀝

πŸ‘‘ AUTHOR πŸ‘‘

Hironori Yoshida <yoshida@cpan.org>

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.


okay and for the cute sign-off: this page is from the perl v5.32.0 era, dated 2021-01-07, filed under the WebSer...:Videos(3pm) manual. go forth and list some videos, bestie, you're gonna eat. πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from