-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
116 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Attlaz\Endpoint; | ||
|
||
use Attlaz\Client; | ||
use Attlaz\Model\Exception\RequestException; | ||
|
||
class ConnectionEndpoint | ||
{ | ||
private Client $client; | ||
|
||
public function __construct(Client $client) | ||
{ | ||
$this->client = $client; | ||
} | ||
|
||
/** | ||
* @param string $projectId | ||
* @return array[] | ||
* @throws RequestException | ||
*/ | ||
public function getConnections(string $projectId): array | ||
{ | ||
$uri = '/project/' . $projectId . '/connections'; | ||
|
||
$request = $this->client->createRequest('GET', $uri); | ||
|
||
// $connections = []; | ||
|
||
$response = $this->client->sendRequest($request); | ||
$rawConnections = $response['data']; | ||
// foreach ($rawEnvironments as $rawEnvironment) { | ||
// $projectEnvironments[] = $this->parseProjectEnvironment($rawEnvironment); | ||
// } | ||
// | ||
// return $projectEnvironments; | ||
|
||
return $rawConnections; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Attlaz\Model\Log; | ||
|
||
class LogStream | ||
{ | ||
private LogStreamId $id; | ||
private string $name; | ||
|
||
public function __construct(LogStreamId $id, string $name) | ||
{ | ||
$this->id = $id; | ||
$this->name = $name; | ||
} | ||
|
||
public function getId(): LogStreamId | ||
{ | ||
return $this->id; | ||
} | ||
|
||
public function getName(): string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters