| Total Complexity | 5 |
| Total Lines | 72 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class Ides extends CloudApiBase |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Returns a list of remote IDEs. |
||
| 18 | * |
||
| 19 | * @param string $applicationUuid The application ID |
||
| 20 | * @return IdesResponse<IdeResponse> |
||
| 21 | */ |
||
| 22 | public function getAll(string $applicationUuid): IdesResponse |
||
| 28 | ) |
||
| 29 | ); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Returns a list of the current user's IDEs. |
||
| 34 | * |
||
| 35 | * @return IdesResponse<IdeResponse> |
||
| 36 | */ |
||
| 37 | public function getMine(): IdesResponse |
||
| 38 | { |
||
| 39 | return new IdesResponse( |
||
| 40 | $this->client->request( |
||
| 41 | 'get', |
||
| 42 | '/account/ides' |
||
| 43 | ) |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Get remote IDE info. |
||
| 49 | * |
||
| 50 | * @param string $ideUuid The Remote IDE universally unique identifier. |
||
| 51 | */ |
||
| 52 | public function get(string $ideUuid): IdeResponse |
||
| 53 | { |
||
| 54 | return new IdeResponse( |
||
| 55 | $this->client->request( |
||
| 56 | 'get', |
||
| 57 | "/ides/$ideUuid" |
||
| 58 | ) |
||
| 59 | ); |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Creates a new remote IDE. |
||
| 64 | */ |
||
| 65 | public function create(string $applicationUuid, string $label): OperationResponse |
||
| 66 | { |
||
| 67 | |||
| 68 | $options = [ |
||
| 69 | 'json' => [ |
||
| 70 | 'label' => $label, |
||
| 71 | ], |
||
| 72 | ]; |
||
| 73 | |||
| 74 | return new OperationResponse( |
||
| 75 | $this->client->request('post', "/applications/$applicationUuid/ides", $options) |
||
| 76 | ); |
||
| 77 | } |
||
| 78 | |||
| 79 | /** |
||
| 80 | * De-provisions a specific Remote IDE. |
||
| 81 | */ |
||
| 82 | public function delete(string $ideUuid): OperationResponse |
||
| 86 | ); |
||
| 87 | } |
||
| 88 | } |
||
| 89 |