NAME

Yandex::Disk::Public - public and unpublic yandex disk resources(files and folders)

VERSION

version 0.07

SYNOPSIS use Yandex::Disk;

my $token = "my token";
my $disk = Yandex::Disk( -token => $token);   #Create Yandex::Disk object
my $public = $disk->public;                   #Create Yandex::Disk::Public object

#Public file '/Temp/small_file'
$public->publicFile (-path => '/Temp/small_file');

METHODS

publicFile(%opt)

Make file or folder as public $disk->publicFile ( -path => '/Temp/small_file' ) or die "Cant public file"; #Make file '/Temp/small_file' as public Options: -path => Path to resource on yandex disk, where need public

unpublicFile(%opt)

Remove public access to resources $disk->unpublicFile( -path => '/Temp/small_file' ) or die "Cant unpublic file"; Options: -path => Path to resource on yandex disk, where need public

listPublished(%opt)

Return array hashref with published files my $list = $disk->listPublished(); Options: -limit => Limit max files to output (default: unlimited) -offset => Offset records from start (default: 0) -type => dir/file (default: undef (display dirs and files)

publicUrl()

Get public url from published file. Return undef if error

publicType()

Get type of published resource. Retutn undef if error