@@ -46,8 +46,8 @@ use WebService::Hexonet::Connector;
46
46
47
47
my $cl = WebService::Hexonet::Connector::APIClient-> new();
48
48
$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' );
51
51
52
52
my $response = $cl -> login();
53
53
# in case of 2FA use:
@@ -63,7 +63,7 @@ if ($response->isSuccess()) {
63
63
# Call a command
64
64
my $response = $cl -> request(
65
65
{
66
- COMMAND => " QueryDomainList" ,
66
+ COMMAND => ' QueryDomainList' ,
67
67
LIMIT => 5
68
68
}
69
69
);
@@ -75,15 +75,15 @@ if ($response->isSuccess()) {
75
75
$res = $response -> getPlain();
76
76
77
77
# 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 ();
80
80
81
81
print " $code $description " ;
82
82
83
83
# close Backend API Session
84
84
# you may verify the result of the logout procedure
85
85
# like for the login procedure above
86
- $r -> logout();
86
+ $cl -> logout();
87
87
}
88
88
```
89
89
@@ -97,15 +97,15 @@ use WebService::Hexonet::Connector;
97
97
98
98
my $cl = WebService::Hexonet::Connector::APIClient-> new();
99
99
$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' );
102
102
# in case of 2FA use:
103
103
# $cl->setOTP("12345678")
104
104
105
105
# Call a command
106
106
my $response = $cl -> request(
107
107
{
108
- COMMAND => " QueryDomainList" ,
108
+ COMMAND => ' QueryDomainList' ,
109
109
LIMIT => 5
110
110
}
111
111
);
@@ -117,8 +117,8 @@ $res = $response->getHash();
117
117
$res = $response -> getPlain();
118
118
119
119
# 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 ();
122
122
123
123
print " $code $description " ;
124
124
```
0 commit comments