diff options
Diffstat (limited to 'lib/WWW/FairViewer/Channels.pm')
-rw-r--r-- | lib/WWW/FairViewer/Channels.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/WWW/FairViewer/Channels.pm b/lib/WWW/FairViewer/Channels.pm index c554044..3ee44d4 100644 --- a/lib/WWW/FairViewer/Channels.pm +++ b/lib/WWW/FairViewer/Channels.pm @@ -41,6 +41,11 @@ Get the most popular videos for a given channel ID. sub popular_videos { my ($self, $channel_id) = @_; + + if (not defined($channel_id)) { # trending popular videos + return $self->_get_results($self->_make_feed_url('popular')); + } + return $self->_get_results($self->_make_feed_url("channels/$channel_id/videos", sort_by => 'popular')); } |