Extend the REST-API in different modules?
| 
             Jakez 
        ![]() 
      Joined: 2004-03-24 
      Posts: 27  | 
  
          
           
     
     
       Posted: Sun, 2013-01-13 04:06     
   | 
| 
     Hi gallery team, I want to extend the gallery3 REST Entity-Array. Therefore I created a new module and extended the item_rest_Core class like this: 
class item_rest extends item_rest_Core {
	static function get($request) {
		$result = parent::get($request);
		$result['entity']['foo'] = 'bar';
		return $result;
	}
}
Everything works fine and as expected. The final module can be reviewed here: https://github.com/mrJakez/gallery3-gps_rest But now I want to extend the REST API in another module with the same pattern, and that causes - of course - in a big problem. Do you have any idea how I can deal with this issue, or is creating just one module the right solution? Cheers,  | 
|


     
Posts: 8339
http://codex.gallery2.org/Gallery3:API:REST
https://docs.google.com/document/pub?id=1DQ1Tz177aX5ZsSgEbjYtYOBufJ0SYhgYvfJtA6snn2Y
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 27
Sorry for that late reply!
Many thanks for the links (especially for the Gallery 3 Developer Handbook!). But to reduce the requests and speed up the remote client, I extended the item_rest_Core now with just one module instead of creating new REST resources.
Anyways - thanks for your answer.
cheers,
Dennis