AsposeDiagramCloud-DiagramApi
view release on metacpan or search on metacpan
lib/AsposeDiagramCloud/DiagramApi.pm view on Meta::CPAN
=begin comment
Aspose.Diagram Cloud API Reference
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 3.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
=end comment
=cut
#
# NOTE: This class is auto generated by the swagger code generator program.
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package AsposeDiagramCloud::DiagramApi;
require 5.6.0;
use strict;
use warnings;
use utf8;
use Exporter;
use Carp qw( croak );
use Log::Any qw($log);
use base "Class::Data::Inheritable";
__PACKAGE__->mk_classdata('method_documentation' => {});
sub new {
my $class = shift;
my $api_client;
if ($_[0] && ref $_[0] && ref $_[0] eq 'AsposeDiagramCloud::ApiClient' ) {
$api_client = $_[0];
} else {
$api_client = AsposeDiagramCloud::ApiClient->new(@_);
}
my $access_token = $api_client->o_auth_post('grant_type' => "client_credentials", 'client_id' => $api_client->{config}->{app_sid}, 'client_secret' =>$api_client->{config}->{app_key})->access_token;
$api_client->{config}->{access_token} = $access_token;
my $base_url = $api_client->{config}->{base_url};
if( substr( $base_url,length($base_url)-1,1) eq '/'){
$base_url = $base_url . $api_client->{config}->{api_version};
}else{
$base_url = $base_url . '/'.$api_client->{config}->{api_version};
}
$api_client->{config}->{base_url} = $base_url;
bless { api_client => $api_client }, $class;
}
#
# diagram_name_convert_put
#
# Converts document from the request's content to the specified format.
#
# @param string $name Download document name. (required)
# @param string $file File to upload (required)
# @param string $source_filename Source document name. (optional)
{
my $params = {
'name' => {
data_type => 'string',
description => 'Download document name.',
required => '1',
},
'file' => {
data_type => 'string',
description => 'File to upload',
required => '1',
},
'source_filename' => {
data_type => 'string',
description => 'Source document name.',
required => '0',
},
};
__PACKAGE__->method_documentation->{ 'diagram_name_convert_put' } = {
summary => 'Converts document from the request's content to the specified format.',
params => $params,
returns => 'string',
};
}
# @return string
#
sub diagram_name_convert_put {
my ($self, %args) = @_;
# verify the required parameter 'name' is set
unless (exists $args{'name'}) {
croak("Missing the required parameter 'name' when calling diagram_name_convert_put");
}
# verify the required parameter 'file' is set
unless (exists $args{'file'}) {
( run in 1.838 second using v1.01-cache-2.11-cpan-ad19def0cd9 )