diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2010-01-27 21:40:48 -0800 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-27 21:40:48 -0800 |
| commit | ec0f89f10a58c3c3751387d5c1d1efcbf940bc9a (patch) | |
| tree | 2463e384b8365dee6876e610354bd7b23d8071de /modules/tag | |
| parent | 4ca91bf6188a1a034ef7770308f42e7c788a1936 (diff) | |
Change "resource" to "entity" in REST responses. They're all
resources, but we differentiate resources as collections and entities.
Diffstat (limited to 'modules/tag')
| -rw-r--r-- | modules/tag/helpers/tag_rest.php | 2 | ||||
| -rw-r--r-- | modules/tag/tests/Tag_Rest_Helper_Test.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/tag/helpers/tag_rest.php b/modules/tag/helpers/tag_rest.php index 4b2a4b46..7143daa9 100644 --- a/modules/tag/helpers/tag_rest.php +++ b/modules/tag/helpers/tag_rest.php @@ -29,7 +29,7 @@ class tag_rest_Core { return array( "url" => $request->url, - "resource" => $tag->as_array(), + "entity" => $tag->as_array(), "relationships" => array( "items" => array( "url" => rest::url("tag_items", $tag), diff --git a/modules/tag/tests/Tag_Rest_Helper_Test.php b/modules/tag/tests/Tag_Rest_Helper_Test.php index eacf91b3..d3cae0fb 100644 --- a/modules/tag/tests/Tag_Rest_Helper_Test.php +++ b/modules/tag/tests/Tag_Rest_Helper_Test.php @@ -31,7 +31,7 @@ class Tag_Rest_Helper_Test extends Gallery_Unit_Test_Case { $request->url = rest::url("tag", $tag); $this->assert_equal_array( array("url" => rest::url("tag", $tag), - "resource" => $tag->as_array(), + "entity" => $tag->as_array(), "relationships" => array( "items" => array( "url" => rest::url("tag_items", $tag), @@ -56,7 +56,7 @@ class Tag_Rest_Helper_Test extends Gallery_Unit_Test_Case { $request->url = rest::url("tag", $tag); $this->assert_equal_array( array("url" => rest::url("tag", $tag), - "resource" => $tag->as_array(), + "entity" => $tag->as_array(), "relationships" => array( "items" => array( "url" => rest::url("tag_items", $tag), |
