diff options
author | Jesús <heckyel@hyperbola.info> | 2020-12-02 13:18:49 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-12-02 13:18:49 -0500 |
commit | a8ec1802a099365ab7d7bc06aee25884fc3876d5 (patch) | |
tree | 9cfa0e3bf26d9aa6c6032b4e30529d67d6fbcae6 /lib/WWW/FairViewer | |
parent | 1e1ff5349fb5c6a72012063709de1807f0a6696d (diff) | |
download | fair-viewer-a8ec1802a099365ab7d7bc06aee25884fc3876d5.tar.lz fair-viewer-a8ec1802a099365ab7d7bc06aee25884fc3876d5.tar.xz fair-viewer-a8ec1802a099365ab7d7bc06aee25884fc3876d5.zip |
Improve syntax
Diffstat (limited to 'lib/WWW/FairViewer')
-rw-r--r-- | lib/WWW/FairViewer/Authentication.pm | 8 | ||||
-rw-r--r-- | lib/WWW/FairViewer/CommentThreads.pm | 6 | ||||
-rw-r--r-- | lib/WWW/FairViewer/Playlists.pm | 5 |
3 files changed, 6 insertions, 13 deletions
diff --git a/lib/WWW/FairViewer/Authentication.pm b/lib/WWW/FairViewer/Authentication.pm index 2e1c140..8798f10 100644 --- a/lib/WWW/FairViewer/Authentication.pm +++ b/lib/WWW/FairViewer/Authentication.pm @@ -34,7 +34,7 @@ sub oauth_refresh_token { my $json_data = $self->lwp_post( $self->_get_token_oauth_url(), [Content => $self->get_www_content_type, - client_id => $self->get_client_id() // return, + client_id => $self->get_client_id() // return, client_secret => $self->get_client_secret() // return, refresh_token => $self->get_refresh_token() // return, grant_type => 'refresh_token', @@ -56,7 +56,7 @@ sub get_accounts_oauth_url { my $url = $self->_append_url_args( ($self->get_oauth_url() . 'auth'), response_type => 'code', - client_id => $self->get_client_id() // return, + client_id => $self->get_client_id() // return, redirect_uri => $self->get_redirect_uri() // return, scope => 'https://www.googleapis.com/auth/youtube.force-ssl', access_type => 'offline', @@ -80,9 +80,9 @@ sub oauth_login { my $json_data = $self->lwp_post( $self->_get_token_oauth_url(), [Content => $self->get_www_content_type, - client_id => $self->get_client_id() // return, + client_id => $self->get_client_id() // return, client_secret => $self->get_client_secret() // return, - redirect_uri => $self->get_redirect_uri() // return, + redirect_uri => $self->get_redirect_uri() // return, grant_type => 'authorization_code', code => $code, ] diff --git a/lib/WWW/FairViewer/CommentThreads.pm b/lib/WWW/FairViewer/CommentThreads.pm index 094ebd7..760756e 100644 --- a/lib/WWW/FairViewer/CommentThreads.pm +++ b/lib/WWW/FairViewer/CommentThreads.pm @@ -36,11 +36,7 @@ Retrieve comments from a video ID. sub comments_from_video_id { my ($self, $video_id) = @_; - $self->_get_results( - $self->_make_feed_url("comments/$video_id", - sort_by => $self->get_comments_order, - ), - ); + $self->_get_results($self->_make_feed_url("comments/$video_id", sort_by => $self->get_comments_order)); } =head2 comment_to_video_id($comment, $videoID) diff --git a/lib/WWW/FairViewer/Playlists.pm b/lib/WWW/FairViewer/Playlists.pm index 9f40453..01277c0 100644 --- a/lib/WWW/FairViewer/Playlists.pm +++ b/lib/WWW/FairViewer/Playlists.pm @@ -25,10 +25,7 @@ sub _make_playlists_url { $opts{'part'} = 'snippet,contentDetails'; } - $self->_make_feed_url( - 'playlists', - %opts, - ); + $self->_make_feed_url('playlists', %opts); } sub get_playlist_id { |