@@ -46,8 +46,8 @@ use WebService::Hexonet::Connector;
4646
4747my $cl = WebService::Hexonet::Connector::APIClient-> new();
4848$cl -> useOTESystem();
49- $cl -> setCredentials(" test.user" , " test.passw0rd" );
50- $cl -> setRemoteIPAddress(" 1.2.3.4" );
49+ $cl -> setCredentials(' test.user' , ' test.passw0rd' );
50+ $cl -> setRemoteIPAddress(' 1.2.3.4' );
5151
5252my $response = $cl -> login();
5353# in case of 2FA use:
@@ -63,7 +63,7 @@ if ($response->isSuccess()) {
6363 # Call a command
6464 my $response = $cl -> request(
6565 {
66- COMMAND => " QueryDomainList" ,
66+ COMMAND => ' QueryDomainList' ,
6767 LIMIT => 5
6868 }
6969 );
@@ -75,15 +75,15 @@ if ($response->isSuccess()) {
7575 $res = $response -> getPlain();
7676
7777 # get the response code and the response description
78- my $code = $response -> code ();
79- my $description = $response -> description ();
78+ my $code = $response -> getCode ();
79+ my $description = $response -> getDescription ();
8080
8181 print " $code $description " ;
8282
8383 # close Backend API Session
8484 # you may verify the result of the logout procedure
8585 # like for the login procedure above
86- $r -> logout();
86+ $cl -> logout();
8787}
8888```
8989
@@ -97,15 +97,15 @@ use WebService::Hexonet::Connector;
9797
9898my $cl = WebService::Hexonet::Connector::APIClient-> new();
9999$cl -> useOTESystem();
100- $cl -> setCredentials(" test.user" , " test.passw0rd" );
101- $cl -> setRemoteIPAddress(" 1.2.3.4" );
100+ $cl -> setCredentials(' test.user' , ' test.passw0rd' );
101+ $cl -> setRemoteIPAddress(' 1.2.3.4' );
102102# in case of 2FA use:
103103# $cl->setOTP("12345678")
104104
105105# Call a command
106106my $response = $cl -> request(
107107 {
108- COMMAND => " QueryDomainList" ,
108+ COMMAND => ' QueryDomainList' ,
109109 LIMIT => 5
110110 }
111111);
@@ -117,8 +117,8 @@ $res = $response->getHash();
117117$res = $response -> getPlain();
118118
119119# get the response code and the response description
120- my $code = $response -> code ();
121- my $description = $response -> description ();
120+ my $code = $response -> getCode ();
121+ my $description = $response -> getDescription ();
122122
123123print " $code $description " ;
124124```
0 commit comments