WebSer...e::Util(3pm)

πŸ’– WebSer...e::Util(3pm) β€” bestie edition πŸ’–

okay so real quick, this is WebService::YouTube::Util, and yeah it lives in the User Contributed Perl Documentation section, which is exactly what it sounds like β€” perl people sharing their stuff, no gatekeeping 🫢. Manual page name is WebSer...e::Util(3pm) if you're the kind of person who bookmarks things (I am. I have 400 tabs. don't perceive me πŸ™ˆ).


✨ NAME ✨

WebService::YouTube::Util β€” it's a Utility for WebService::YouTube. that's the whole vibe. a lil helper bestie for the bigger module. πŸ’…


🌸 VERSION 🌸

This document describes WebService::YouTube::Util version 1.0.3. iconic. she's got a number. she's official. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's how you actually use her, copy-paste-able, no cap:

use WebService::YouTube::Util;

# Get an URI of RSS
my $uri = WebService::YouTube::Util->rss_uri( 'global', 'recently_added' );

# Get an URI of REST API
my $uri = WebService::YouTube::Util->rest_uri( $dev_id,
                                               'youtube.videos.list_by_tag',
                                               { tag => 'monkey' }
                                             );

# Get a downloadable URI
my $uri = WebService::YouTube::Util->get_video_uri('rdwz7QiG0lk');

# Get a video which type is .flv
my $content = WebService::YouTube::Util->get_video('rdwz7QiG0lk');

notice how 'monkey' is the tag in the example? taste. πŸ‘‘


πŸŽ€ DESCRIPTION πŸŽ€

This is an utility for WebService::YouTube. short. sweet. she knows her purpose. main character energy honestly. ✨


πŸ‘‘ SUBROUTINES/METHODS πŸ‘‘

here's the whole roster, bestie, every single one:

πŸ’œ rss_uri( $type, $arg )

Returns a URI of RSS. $type should be 'global' or 'tag' or 'user'. and $arg is required when $type is 'tag' or 'user' β€” so like, don't leave her hanging, she needs it. πŸ₯Ί

πŸ’œ rest_uri( $dev_id, $method, \%fields )

Returns a URI of REST API. $dev_id is your developer ID of YouTube (yes your developer ID, go get one, I believe in you 🌈). $method is a method name like a 'youtube.*.*'. and %fields can contain optional parameter. optional! she's flexible like that. πŸ’…

πŸ’œ get_video_uri( $video, \%args )

Returns a downloadable URI of $video. $video should be a video ID or a WebService::YouTube::Video object. %args can contain some optional arguments:

  • ua β€” LWP::UserAgent object

πŸ’œ get_video( $video, \%args )

Returns a downloaded content of $video. $video should be a video ID or a WebService::YouTube::Video object. %args can contain some optional arguments:

  • ua β€” LWP::UserAgent object

😭 DIAGNOSTICS 😭

when things go sideways, here's what she yells at you:

  • type of ... is not supported β€” No such RSS. The type should be 'global' or 'tag' or 'user'. (basically: girl, that's not one of the three options. read the room. πŸ™ˆ)
  • got a page but it is invalid page β€” Maybe, YouTube is being maintained. :-) β€” yes that smiley is in the original and honestly it's sending me πŸ’€. not her fault, YouTube's just down bad.

🌈 CONFIGURATION AND ENVIRONMENT 🌈

WebService::YouTube::Util requires no configuration files or environment variables. zero setup. plug and play. the way I LOVE a low-maintenance module. 🫢✨


🧚 DEPENDENCIES 🧚

she's not doing this alone, she has a support system:

  • WebService::YouTube
  • LWP::UserAgent
  • URI::Escape

πŸ’€ INCOMPATIBILITIES πŸ’€

None reported. no beef. no drama. we love a peaceful queen. πŸ•ŠοΈ


πŸ“ BUGS AND LIMITATIONS πŸ“

No bugs have been reported. (suspiciously perfect? no, she's just built different. πŸ’…)

Please report any 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>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. β€” okay so like, it's a whole notification pipeline, you'll be kept in the loop, that's the deal, fr fr. πŸ“¬


⭐ 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. so like, take her, share her, remix her, just keep the same energy. 🌸


and that's the whole page bestie, we made it πŸŽ‰ β€” shoutout to perl v5.32.0, dated 2021-01-07, on WebSer...e::Util(3pm). go forth and pull them YouTube RSS feeds, ily, bye πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from