-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
8 changed files
with
259 additions
and
1 deletion.
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
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,28 @@ | ||
<?php | ||
|
||
namespace AcquiaCloudApi\Response; | ||
|
||
/** | ||
* Class TagResponse | ||
* @package AcquiaCloudApi\Response | ||
*/ | ||
class TagResponse | ||
{ | ||
|
||
public $name; | ||
public $color; | ||
public $context; | ||
public $links; | ||
|
||
/** | ||
* TagResponse constructor. | ||
* @param object $tag | ||
*/ | ||
public function __construct($tag) | ||
{ | ||
$this->name = $tag->name; | ||
$this->color = $tag->color; | ||
$this->context = $tag->context; | ||
$this->links = $tag->_links; | ||
} | ||
} |
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,22 @@ | ||
<?php | ||
|
||
namespace AcquiaCloudApi\Response; | ||
|
||
/** | ||
* Class TagsResponse | ||
* @package AcquiaCloudApi\Response | ||
*/ | ||
class TagsResponse extends \ArrayObject | ||
{ | ||
|
||
/** | ||
* TagsResponse constructor. | ||
* @param array $tags | ||
*/ | ||
public function __construct($tags) | ||
{ | ||
parent::__construct(array_map(function ($tag) { | ||
return new TagResponse($tag); | ||
}, $tags), self::ARRAY_AS_PROPS); | ||
} | ||
} |
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,14 @@ | ||
{ | ||
"message": "The tag has been added to the application.", | ||
"_links": { | ||
"self": { | ||
"href": "https://cloud.acquia.com/api/applications/0d9fc48f-9871-41d9-8b41-0f815e6039eb/tags" | ||
}, | ||
"parent": { | ||
"href": "https://cloud.acquia.com/api/applications/0d9fc48f-9871-41d9-8b41-0f815e6039eb" | ||
}, | ||
"notification": { | ||
"href": "https://cloud.acquia.com/api/notifications/773fca86-9d87-45dc-9220-9ba38306bbb1" | ||
} | ||
} | ||
} |
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,14 @@ | ||
{ | ||
"message": "The tag has been removed from the application.", | ||
"_links": { | ||
"self": { | ||
"href": "https://cloud.acquia.com/api/applications/0d9fc48f-9871-41d9-8b41-0f815e6039eb/tags/test_tag" | ||
}, | ||
"parent": { | ||
"href": "https://cloud.acquia.com/api/applications/0d9fc48f-9871-41d9-8b41-0f815e6039eb/tags" | ||
}, | ||
"notification": { | ||
"href": "https://cloud.acquia.com/api/notifications/37cdf705-9774-4526-9bf0-9feb279630ee" | ||
} | ||
} | ||
} |
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,60 @@ | ||
{ | ||
"total": 1, | ||
"pagination": { | ||
"total": 1, | ||
"limit": 1, | ||
"offset": 0 | ||
}, | ||
"_links": { | ||
"self": { | ||
"href": "https://cloud.acquia.com/api/applications/185f07c7-9c4f-407b-8968-67892ebcb38a/tags" | ||
}, | ||
"parent": { | ||
"href": "https://cloud.acquia.com/api/applications/185f07c7-9c4f-407b-8968-67892ebcb38a" | ||
}, | ||
"limit": { | ||
"href": "https://cloud.acquia.com/api/applications/185f07c7-9c4f-407b-8968-67892ebcb38a/tags{?limit}", | ||
"templated": true | ||
}, | ||
"offset": { | ||
"href": "https://cloud.acquia.com/api/applications/185f07c7-9c4f-407b-8968-67892ebcb38a/tags{?offset}", | ||
"templated": true | ||
}, | ||
"sort": { | ||
"href": "https://cloud.acquia.com/api/applications/185f07c7-9c4f-407b-8968-67892ebcb38a/tags{?sort}", | ||
"templated": true | ||
}, | ||
"filter": { | ||
"href": "https://cloud.acquia.com/api/applications/185f07c7-9c4f-407b-8968-67892ebcb38a/tags{?filter}", | ||
"templated": true | ||
} | ||
}, | ||
"_embedded": { | ||
"items": [ | ||
{ | ||
"name": "Dev", | ||
"color": "orange", | ||
"context": { | ||
"organization": { | ||
"uuids": [ | ||
"2375e327-3fff-11e3-9170-12313920a02c" | ||
] | ||
}, | ||
"application": { | ||
"uuids": [ | ||
"185f07c7-9c4f-407b-8968-67892ebcb38a" | ||
] | ||
} | ||
}, | ||
"_links": { | ||
"self": { | ||
"href": "https://cloud.acquia.com/api/applications/2375e327-3fff-11e3-9170-12313920a02c/tags/dev" | ||
}, | ||
"parent": { | ||
"href": "https://cloud.acquia.com/api/applications/2375e327-3fff-11e3-9170-12313920a02c/tags" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} |