Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 407f86b

Browse files
fix(readme): installation steps and examples
1 parent 2e1182a commit 407f86b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ use WebService::Hexonet::Connector;
4646

4747
my $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

5252
my $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

9898
my $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
106106
my $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

123123
print "$code $description";
124124
```

0 commit comments

Comments
 (0)