File Coverage

lib/Smartcat/Client/GlossaryApi.pm
Criterion Covered Total %
statement 29 47 61.7
branch 1 6 16.6
condition 2 6 33.3
subroutine 9 10 90.0
pod 0 2 0.0
total 41 71 57.7


line stmt bran cond sub pod time code
1              
2             =begin comment
3              
4             Smartcat Integration API
5              
6             No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
7              
8             OpenAPI spec version: v1
9              
10             Generated by: https://github.com/swagger-api/swagger-codegen.git
11              
12             =end comment
13              
14             =cut
15              
16             #
17             # NOTE: This class is auto generated by the swagger code generator program.
18             # Do not edit the class manually.
19             # Ref: https://github.com/swagger-api/swagger-codegen
20             #
21             package Smartcat::Client::GlossaryApi;
22              
23             require 5.6.0;
24 1     1   857 use strict;
  1         3  
  1         32  
25 1     1   6 use warnings;
  1         1  
  1         35  
26 1     1   643 use utf8;
  1         16  
  1         6  
27 1     1   33 use Exporter;
  1         3  
  1         55  
28 1     1   6 use Carp qw( croak );
  1         2  
  1         56  
29 1     1   486 use Log::Any qw($log);
  1         9789  
  1         6  
30              
31 1     1   3132 use Smartcat::Client::ApiClient;
  1         4  
  1         51  
32              
33 1     1   12 use base "Class::Data::Inheritable";
  1         2  
  1         687  
34              
35             __PACKAGE__->mk_classdata( 'method_documentation' => {} );
36              
37             sub new {
38 1     1 0 647 my $class = shift;
39 1         3 my $api_client;
40              
41 1 50 33     10 if ( $_[0] && ref $_[0] && ref $_[0] eq 'Smartcat::Client::ApiClient' ) {
      33        
42 0         0 $api_client = $_[0];
43             }
44             else {
45 1         8 $api_client = Smartcat::Client::ApiClient->new(@_);
46             }
47              
48 1         10 bless { api_client => $api_client }, $class;
49              
50             }
51              
52             #
53             # glossary_get_glossaries
54             #
55             #
56             #
57             {
58             my $params = {};
59             __PACKAGE__->method_documentation->{'glossary_get_glossaries'} = {
60             summary => '',
61             params => $params,
62             returns => 'ARRAY[GlossaryModel]',
63             };
64             }
65              
66             # @return ARRAY[GlossaryModel]
67             #
68             sub glossary_get_glossaries {
69 0     0 0   my ( $self, %args ) = @_;
70              
71             # parse inputs
72 0           my $_resource_path = '/api/integration/v1/glossaries';
73              
74 0           my $_method = 'GET';
75 0           my $query_params = {};
76 0           my $header_params = {};
77 0           my $form_params = {};
78              
79             # 'Accept' and 'Content-Type' header
80             my $_header_accept = $self->{api_client}
81 0           ->select_header_accept( 'application/json', 'text/json' );
82 0 0         if ($_header_accept) {
83 0           $header_params->{'Accept'} = $_header_accept;
84             }
85             $header_params->{'Content-Type'} =
86 0           $self->{api_client}->select_header_content_type();
87              
88 0           my $_body_data;
89              
90             # authentication setting, if any
91 0           my $auth_settings = [qw()];
92              
93             # make the API Call
94             my $response = $self->{api_client}->call_api(
95 0           $_resource_path, $_method, $query_params, $form_params,
96             $header_params, $_body_data, $auth_settings
97             );
98 0 0         if ( !$response ) {
99 0           return;
100             }
101             my $_response_object =
102 0           $self->{api_client}->deserialize( 'ARRAY[GlossaryModel]', $response );
103 0           return $_response_object;
104             }
105              
106             1;