AsposeSlidesCloud-SlidesApi
view release on metacpan or search on metacpan
lib/AsposeSlidesCloud/SlidesApi.pm view on Meta::CPAN
sub download_file {
my ($self, %args) = @_;
# verify the required parameter 'path' is set
unless (exists $args{'path'} && defined $args{'path'} && $args{'path'}) {
croak("Missing the required parameter 'path' when calling download_file");
}
# parse inputs
my $_resource_path = '/slides/storage/file/{path}';
my $_method = 'GET';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('multipart/form-data');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
# query params
if (exists $args{'storage_name'} && defined $args{'storage_name'}) {
$query_params->{'storageName'} = $self->{api_client}->to_query_value($args{'storage_name'});
}
# query params
if (exists $args{'version_id'} && defined $args{'version_id'}) {
$query_params->{'versionId'} = $self->{api_client}->to_query_value($args{'version_id'});
}
# path params
if ( exists $args{'path'}) {
my $_base_variable = "{" . "path" . "}";
my $_base_value = $self->{api_client}->to_path_value($args{'path'});
$_resource_path =~ s/$_base_variable/$_base_value/g;
}
my $_body_data;
my $files = [];
# make the API Call
my $response = $self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $files);
if (!$response) {
return;
}
my $_response_object = $self->{api_client}->deserialize('File', $response);
return $_response_object;
}
#
# download_image
#
# Get image in specified format.
#
# @param string $name Document name. (required)
# @param int $index Image index. (required)
# @param string $format Export format (png, jpg, gif). (required)
# @param string $password Document password. (optional)
# @param string $folder Document folder. (optional)
# @param string $storage Document storage. (optional)
# @param int $quality Image quality (0 to 100; has effect only on Jpeg format). (optional, default to 100)
{
my $params = {
'name' => {
data_type => 'string',
description => 'Document name.',
required => '1',
},
'index' => {
data_type => 'int',
description => 'Image index.',
required => '1',
},
'format' => {
data_type => 'string',
description => 'Export format (png, jpg, gif).',
required => '1',
},
'password' => {
data_type => 'string',
description => 'Document password.',
required => '0',
},
'folder' => {
data_type => 'string',
description => 'Document folder.',
required => '0',
},
'storage' => {
data_type => 'string',
description => 'Document storage.',
required => '0',
},
'quality' => {
data_type => 'int',
description => 'Image quality (0 to 100; has effect only on Jpeg format).',
required => '0',
},
};
__PACKAGE__->method_documentation->{ 'download_image' } = {
summary => 'Get image in specified format.',
params => $params,
returns => 'File',
};
}
# @return File
#
sub download_image {
my ($self, %args) = @_;
# verify the required parameter 'name' is set
unless (exists $args{'name'} && defined $args{'name'} && $args{'name'}) {
croak("Missing the required parameter 'name' when calling download_image");
}
# verify the required parameter 'index' is set
unless (exists $args{'index'} && defined $args{'index'}) {
croak("Missing the required parameter 'index' when calling download_image");
}
# verify the required parameter 'format' is set
unless (exists $args{'format'} && defined $args{'format'} && $args{'format'}) {
croak("Missing the required parameter 'format' when calling download_image");
}
# verify enum value
if (!grep(/^$args{'format'}$/i, ( 'Jpeg', 'Png', 'Gif', 'Bmp', 'Tiff' ))) {
croak("Invalid value for 'format': " . $args{'format'});
}
# parse inputs
my $_resource_path = '/slides/{name}/images/{index}/{format}';
my $_method = 'GET';
my $query_params = {};
my $header_params = {};
lib/AsposeSlidesCloud/SlidesApi.pm view on Meta::CPAN
# verify the required parameter 'document' is set
unless (exists $args{'document'} && defined $args{'document'} && $args{'document'}) {
croak("Missing the required parameter 'document' when calling download_image_default_format_online");
}
# verify the required parameter 'index' is set
unless (exists $args{'index'} && defined $args{'index'}) {
croak("Missing the required parameter 'index' when calling download_image_default_format_online");
}
# parse inputs
my $_resource_path = '/slides/images/{index}';
my $_method = 'POST';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('multipart/form-data');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
# header params
if ( exists $args{'password'}) {
$header_params->{':password'} = $self->{api_client}->to_header_value($args{'password'});
}
# path params
if ( exists $args{'index'}) {
my $_base_variable = "{" . "index" . "}";
my $_base_value = $self->{api_client}->to_path_value($args{'index'});
$_resource_path =~ s/$_base_variable/$_base_value/g;
}
my $_body_data;
my $files = [];
if ( exists $args{'document'} && $args{'document'}) {
push(@$files, $args{'document'});
}
# make the API Call
my $response = $self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $files);
if (!$response) {
return;
}
my $_response_object = $self->{api_client}->deserialize('File', $response);
return $_response_object;
}
#
# download_image_online
#
# Get image in specified format.
#
# @param File $document Document data. (required)
# @param int $index Image index. (required)
# @param string $format Export format (png, jpg, gif). (required)
# @param string $password Document password. (optional)
# @param int $quality Image quality (0 to 100; has effect only on Jpeg format). (optional, default to 100)
{
my $params = {
'document' => {
data_type => 'File',
description => 'Document data.',
required => '1',
},
'index' => {
data_type => 'int',
description => 'Image index.',
required => '1',
},
'format' => {
data_type => 'string',
description => 'Export format (png, jpg, gif).',
required => '1',
},
'password' => {
data_type => 'string',
description => 'Document password.',
required => '0',
},
'quality' => {
data_type => 'int',
description => 'Image quality (0 to 100; has effect only on Jpeg format).',
required => '0',
},
};
__PACKAGE__->method_documentation->{ 'download_image_online' } = {
summary => 'Get image in specified format.',
params => $params,
returns => 'File',
};
}
# @return File
#
sub download_image_online {
my ($self, %args) = @_;
# verify the required parameter 'document' is set
unless (exists $args{'document'} && defined $args{'document'} && $args{'document'}) {
croak("Missing the required parameter 'document' when calling download_image_online");
}
# verify the required parameter 'index' is set
unless (exists $args{'index'} && defined $args{'index'}) {
croak("Missing the required parameter 'index' when calling download_image_online");
}
# verify the required parameter 'format' is set
unless (exists $args{'format'} && defined $args{'format'} && $args{'format'}) {
croak("Missing the required parameter 'format' when calling download_image_online");
}
# verify enum value
if (!grep(/^$args{'format'}$/i, ( 'Jpeg', 'Png', 'Gif', 'Bmp', 'Tiff' ))) {
croak("Invalid value for 'format': " . $args{'format'});
}
# parse inputs
my $_resource_path = '/slides/images/{index}/{format}';
my $_method = 'POST';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('multipart/form-data');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
# query params
if (exists $args{'quality'} && defined $args{'quality'}) {
$query_params->{'quality'} = $self->{api_client}->to_query_value($args{'quality'});
}
# header params
if ( exists $args{'password'}) {
$header_params->{':password'} = $self->{api_client}->to_header_value($args{'password'});
}
# path params
if ( exists $args{'index'}) {
my $_base_variable = "{" . "index" . "}";
my $_base_value = $self->{api_client}->to_path_value($args{'index'});
$_resource_path =~ s/$_base_variable/$_base_value/g;
}
# path params
if ( exists $args{'format'}) {
my $_base_variable = "{" . "format" . "}";
my $_base_value = $self->{api_client}->to_path_value($args{'format'});
$_resource_path =~ s/$_base_variable/$_base_value/g;
}
my $_body_data;
my $files = [];
if ( exists $args{'document'} && $args{'document'}) {
push(@$files, $args{'document'});
}
# make the API Call
my $response = $self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $files);
if (!$response) {
return;
}
my $_response_object = $self->{api_client}->deserialize('File', $response);
return $_response_object;
}
#
# download_images
#
# Get all presentation images in specified format.
#
# @param string $name (required)
# @param string $format Export format (png, jpg, gif). (required)
# @param string $password Document password. (optional)
# @param string $folder Document folder. (optional)
# @param string $storage Document storage. (optional)
# @param int $quality Image quality (0 to 100; has effect only on Jpeg format). (optional, default to 100)
{
my $params = {
'name' => {
data_type => 'string',
description => '',
required => '1',
},
'format' => {
data_type => 'string',
description => 'Export format (png, jpg, gif).',
required => '1',
},
'password' => {
data_type => 'string',
description => 'Document password.',
required => '0',
},
'folder' => {
data_type => 'string',
description => 'Document folder.',
required => '0',
},
'storage' => {
data_type => 'string',
description => 'Document storage.',
required => '0',
},
'quality' => {
data_type => 'int',
description => 'Image quality (0 to 100; has effect only on Jpeg format).',
required => '0',
},
};
__PACKAGE__->method_documentation->{ 'download_images' } = {
summary => 'Get all presentation images in specified format.',
params => $params,
returns => 'File',
};
}
# @return File
#
sub download_images {
my ($self, %args) = @_;
# verify the required parameter 'name' is set
unless (exists $args{'name'} && defined $args{'name'} && $args{'name'}) {
croak("Missing the required parameter 'name' when calling download_images");
}
# verify the required parameter 'format' is set
unless (exists $args{'format'} && defined $args{'format'} && $args{'format'}) {
croak("Missing the required parameter 'format' when calling download_images");
}
# verify enum value
if (!grep(/^$args{'format'}$/i, ( 'Jpeg', 'Png', 'Gif', 'Bmp', 'Tiff' ))) {
croak("Invalid value for 'format': " . $args{'format'});
}
# parse inputs
my $_resource_path = '/slides/{name}/images/download/{format}';
my $_method = 'POST';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('multipart/form-data');
if ($_header_accept) {
lib/AsposeSlidesCloud/SlidesApi.pm view on Meta::CPAN
},
};
__PACKAGE__->method_documentation->{ 'download_images_default_format_online' } = {
summary => 'Get all presentation images.',
params => $params,
returns => 'File',
};
}
# @return File
#
sub download_images_default_format_online {
my ($self, %args) = @_;
# verify the required parameter 'document' is set
unless (exists $args{'document'} && defined $args{'document'} && $args{'document'}) {
croak("Missing the required parameter 'document' when calling download_images_default_format_online");
}
# parse inputs
my $_resource_path = '/slides/images/download';
my $_method = 'POST';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('multipart/form-data');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
# header params
if ( exists $args{'password'}) {
$header_params->{':password'} = $self->{api_client}->to_header_value($args{'password'});
}
my $_body_data;
my $files = [];
if ( exists $args{'document'} && $args{'document'}) {
push(@$files, $args{'document'});
}
# make the API Call
my $response = $self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $files);
if (!$response) {
return;
}
my $_response_object = $self->{api_client}->deserialize('File', $response);
return $_response_object;
}
#
# download_images_online
#
# Get all presentation images in specified format.
#
# @param File $document Document data. (required)
# @param string $format Export format (png, jpg, gif). (required)
# @param string $password Document password. (optional)
# @param int $quality Image quality (0 to 100; has effect only on Jpeg format). (optional, default to 100)
{
my $params = {
'document' => {
data_type => 'File',
description => 'Document data.',
required => '1',
},
'format' => {
data_type => 'string',
description => 'Export format (png, jpg, gif).',
required => '1',
},
'password' => {
data_type => 'string',
description => 'Document password.',
required => '0',
},
'quality' => {
data_type => 'int',
description => 'Image quality (0 to 100; has effect only on Jpeg format).',
required => '0',
},
};
__PACKAGE__->method_documentation->{ 'download_images_online' } = {
summary => 'Get all presentation images in specified format. ',
params => $params,
returns => 'File',
};
}
# @return File
#
sub download_images_online {
my ($self, %args) = @_;
# verify the required parameter 'document' is set
unless (exists $args{'document'} && defined $args{'document'} && $args{'document'}) {
croak("Missing the required parameter 'document' when calling download_images_online");
}
# verify the required parameter 'format' is set
unless (exists $args{'format'} && defined $args{'format'} && $args{'format'}) {
croak("Missing the required parameter 'format' when calling download_images_online");
}
# verify enum value
if (!grep(/^$args{'format'}$/i, ( 'Jpeg', 'Png', 'Gif', 'Bmp', 'Tiff' ))) {
croak("Invalid value for 'format': " . $args{'format'});
}
# parse inputs
my $_resource_path = '/slides/images/download/{format}';
my $_method = 'POST';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept('multipart/form-data');
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
# query params
if (exists $args{'quality'} && defined $args{'quality'}) {
$query_params->{'quality'} = $self->{api_client}->to_query_value($args{'quality'});
}
# header params
( run in 1.114 second using v1.01-cache-2.11-cpan-744e820c463 )