NAME
WebService::Strike::Torrent - Class representing information about a torrent
SYNOPSIS
use WebService::Strike;
my $t = strike 'B425907E5755031BDA4A8D1B6DCCACA97DA14C04';
say $t->hash; # B425907E5755031BDA4A8D1B6DCCACA97DA14C04
say $t->title; # Arch Linux 2015.01.01 (x86/x64)
say $t->category; # Applications
say $t->sub_category; # '' (empty string)
say $t->seeds;
say $t->leeches;
say $t->count; # 1
say $t->size; # 587 MB
say $t->date; # 1420502400
say $t->uploader; # The_Doctor-
say @{$t->names}; # archlinux-2015.01.01-dual.iso
say @{$t->lengths}; # 615514112
say $t->magnet; # magnet:?xt=urn:btih:B425907E5755031BDA4A8D1B6DCCACA97DA14C04&dn=Arch%20Linux%202015.01.01%20%28x86%2Fx64%29
my $tor = $t->torrent; # $torrent contains the torrent file contents
$t->torrent('x.torrent'); # Download torrent file to x.torrent
DESCRIPTION
WebService::Strike::Torrent is a class that represents information about a torrent.
Methods:
- hash, torrent_hash
-
The info_hash of the torrent.
- title, torrent_title
-
The title of the torrent.
- category, torrent_category
-
The category of the torrent.
- sub_category
-
The subcategory of the torrent.
- seeds
-
The number of seeders.
- leeches
-
The number of leechers.
- count, file_count
-
The number of files contained in the torrent.
- size
-
The total size of the files in the torrent as a human-readable string. See file_lengths for exact sizes.
- date, upload_date
-
Unix timestamp when the torrent was uploaded, with precision of one day.
- uploader, uploader_username
-
Username of the user who uploaded the torrent.
- file_names
-
Arrayref of paths of files in the torrent.
- file_lengths
-
Arrayref of lengths of files in the torrent, in bytes.
- magnet
-
Magnet link for the torrent.
- torrent([$filename])
-
Downloads the torrent from Strike. With no arguments, returns the contents of the torrent file. With an argument, stores the torrent in $filename.
Both forms return a true value for success and false for failure.
SEE ALSO
WebService::Strike, http://getstrike.net/api/
AUTHOR
Marius Gavrilescu, <marius@ieval.ro>
COPYRIGHT AND LICENSE
Copyright (C) 2015 by Marius Gavrilescu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.20.2 or, at your option, any later version of Perl 5 you may have available.