From: David S. <D.S...@gm...> - 2011-05-12 18:48:55
|
I created a very simple tag_values module that delivers all tag values for a given item id. Based on the tags modules ... very simple. Cool! It's like this: Request: http://localhost/~david/gallery3/index.php/rest/tag_values/<<item id>>?output=html Response: array ( 'url' => 'http://localhost/~david/gallery3/index.php/rest/tag_values/<<item id>>?output=html<http://localhost/%7Edavid/gallery3/index.php/rest/tag_values/2?output=html>', 'members' => array ( 0 => 'tag1', 1 => 'tag2', 2 => 'tag3', 3 => 'tag4', ), ) Question on consistency: I implemented relationships($resource_type, $resource). Now it shows up in the item-rest-resource under relationships. Just great. BUT: It's not consistent! Usually rest-resources should only put restful urls in 'relationships', isn't it? How should this be structured? Via a parameter on the rest-resources? I was thinking about '&resolveRelationships=true/false, what do other think? 1 Gallery3 question: Why does $request->url result in an item id (context rest::resolve($request->url))? Where's this defined/coded? Just want to understand what I'm actually doing :). Thx, David Btw. gallery3 & kohana are fantastic to work with. And sorry to start a new conversion, but can't follow up on the old one. |