Net-NicoVideo
view release on metacpan or search on metacpan
lib/Net/NicoVideo.pm view on Meta::CPAN
=head2 add_mylist(group_id, mylistitem, [token])
Add "mylistitem" to "mylistgroup".
This is equivalent to NicoAPI.Mylist#add.
=head2 update_mylist(group_id, mylistitem, [token])
Update "mylistitem" in "mylistgroup".
This is equivalent to NicoAPI.Mylist#update.
=head2 remove_mylist(group_id, mylistitem, [token])
Remove "mylistitem" from "mylistgroup".
This is equivalent to NicoAPI.Mylist#remove.
=head2 delete_mylist(group_id, mylistitem, [token])
alias of remove_mylist().
=head2 move_mylist(src-group_id, dst-group_id, mylistitem, [token])
Move "mylistitem" from src "mylistgroup" to dst "mylistgroup".
This is equivalent to NicoAPI.Mylist#move.
=head2 copy_mylist(src-group_id, dst-group_id, mylistitem, [token])
Duplicate "mylistitem" from src "mylistgroup" to dst "mylistgroup".
This is equivalent to NicoAPI.Mylist#copy.
=head1 UTILITY METHOD
Other utility methods.
=head2 through_login(ua)
The user agent who gave the argument is led to a login page, and it logs in.
And the original user agent who gave the result is returned.
The returning $ua is the same instance as what was given.
Typically, it is used as follows.
$res = $ua->request_mylist_rss($mylist);
unless( $res->is_authflagged ){ # if not logged-in
$ua = $self->through_login($ua); # login
$res = $ua->request_mylist_rss($mylist); # try again
}
When login goes wrong, then croak.
=head2 download(video_id, file)
download() is a shortcut to download video which is identified by video_id.
For busy person, you can download a video by one liner like this:
$ perl -MNet::NicoVideo -e 'Net::NicoVideo->new->download(@ARGV)' \
smNNNNNN ./smile.mp4
Note that it is necessary to set environment variables in advance.
Although the media file to download may be MP4, it may not be so.
Either MP4, or FLV or SWF is known now.
By "thumbinfo" object which has same video_id can judge type of media.
=head1 ENVIRONMENT VARIABLE
NET_NICOVIDEO_EMAIL
NET_NICOVIDEO_PASSWORD
NET_NICOVIDEO_DELAY
These obvious environment variables are effective.
If the object has each value as its fields, priority is given to them.
=head1 SEE ALSO
L<LWP::UserAgent>
L<Net::NicoVideo::Content>
L<Net::NicoVideo::UserAgent>
=head1 REPOSITORY
Net::NicoVideo is hosted on github https://github.com/hiroaki/Net-NicoVideo
=head1 AUTHOR
WATANABE Hiroaki E<lt>hwat@cpan.orgE<gt>
=head1 LICENSE
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut
( run in 0.532 second using v1.01-cache-2.11-cpan-39bf76dae61 )