Skip to content

Commit

Permalink
feat(core): Allow Eseye to exploit mocked API (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
warlof authored Dec 6, 2018
1 parent 9fba47e commit 3fc6cb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
3 changes: 3 additions & 0 deletions src/Containers/EsiConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ class EsiConfiguration extends AbstractArrayAccess
protected $data = [
'http_user_agent' => 'Eseye Default Library',
'datasource' => 'tranquility',
'esi_scheme' => 'https',
'esi_host' => 'esi.evetech.net',
'esi_port' => 443,

// Fetcher
'fetcher' => GuzzleFetcher::class,
Expand Down
13 changes: 3 additions & 10 deletions src/Eseye.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ class Eseye
*/
protected $request_body = [];

/**
* @var string
*/
protected $esi = [
'scheme' => 'https',
'host' => 'esi.evetech.net',
];

/**
* @var string
*/
Expand Down Expand Up @@ -327,8 +319,9 @@ public function buildDataUri(string $uri, array $data): Uri
], $this->getQueryString());

return Uri::fromParts([
'scheme' => $this->esi['scheme'],
'host' => $this->esi['host'],
'scheme' => $this->getConfiguration()->esi_scheme,
'host' => $this->getConfiguration()->esi_host,
'port' => $this->getConfiguration()->esi_port,
'path' => rtrim($this->getVersion(), '/') .
$this->mapDataToUri($uri, $data),
'query' => http_build_query($query_params),
Expand Down

0 comments on commit 3fc6cb9

Please sign in to comment.