Skip to content

Commit c42cfc1

Browse files
authored
Merge pull request #19 from nstack-io/develop
Develop
2 parents a287ae9 + b4dfa49 commit c42cfc1

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/Clients/NStackClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct(Config $nstackConfig, Client $client = null)
3434
'timeout' => 5,
3535
'headers' => [
3636
'X-Application-Id' => $nstackConfig->getAppId(),
37-
'X-Rest-Api-Key' => $nstackConfig->getRestAppKey(),
37+
'X-Rest-Api-Key' => $nstackConfig->getRestApiKey(),
3838
'Content-Type' => 'application/json',
3939
],
4040
]));
@@ -54,4 +54,4 @@ protected function buildPath(string $path): string
5454
{
5555
return 'api/' . $this->nstackConfig->getVersion() . '/' . $path;
5656
}
57-
}
57+
}

src/Config.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Config
2020
protected $appId;
2121

2222
/** @var string */
23-
protected $restAppKey;
23+
protected $restApiKey;
2424

2525
/** @var string|null */
2626
protected $masterKey;
@@ -29,21 +29,21 @@ class Config
2929
* Config constructor.
3030
*
3131
* @param string $appId
32-
* @param string $restAppKey
32+
* @param string $restApiKey
3333
* @param string|null $masterKey
3434
* @param string|null $baseUrl
3535
* @param string $version
3636
* @author Casper Rasmussen <cr@nodes.dk>
3737
*/
3838
public function __construct(
3939
string $appId,
40-
string $restAppKey,
40+
string $restApiKey,
4141
?string $masterKey = null,
4242
?string $baseUrl = null,
4343
string $version = 'v2'
4444
) {
4545
$this->appId = $appId;
46-
$this->restAppKey = $restAppKey;
46+
$this->restApiKey = $restApiKey;
4747
$this->masterKey = $masterKey;
4848

4949
if ($baseUrl) {
@@ -64,7 +64,7 @@ public static function createFromArray(array $data): self
6464
{
6565
return new self(
6666
$data['application_id'],
67-
$data['rest_app_key'],
67+
$data['rest_api_key'],
6868
$data['master_key'] ?? null,
6969
$data['base_url'] ?? null,
7070
$data['version']
@@ -114,25 +114,25 @@ public function setAppId(string $appId): void
114114
}
115115

116116
/**
117-
* getRestAppKey
117+
* getRestApiKey
118118
*
119119
* @return string
120120
* @author Casper Rasmussen <cr@nodes.dk>
121121
*/
122-
public function getRestAppKey(): string
122+
public function getRestApiKey(): string
123123
{
124-
return $this->restAppKey;
124+
return $this->restApiKey;
125125
}
126126

127127
/**
128-
* setRestAppKey
128+
* setRestApiKey
129129
*
130-
* @param string $restAppKey
130+
* @param string $restApiKey
131131
* @author Casper Rasmussen <cr@nodes.dk>
132132
*/
133-
public function setRestAppKey(string $restAppKey): void
133+
public function setRestApoKey(string $restApiKey): void
134134
{
135-
$this->restAppKey = $restAppKey;
135+
$this->restApiKey = $restApiKey;
136136
}
137137

138138
/**
@@ -178,4 +178,4 @@ public function setVersion(string $version): void
178178
{
179179
$this->version = $version;
180180
}
181-
}
181+
}

0 commit comments

Comments
 (0)