diff --git a/ItemRelationsPlugin.php b/ItemRelationsPlugin.php index 63df591..939361a 100644 --- a/ItemRelationsPlugin.php +++ b/ItemRelationsPlugin.php @@ -58,6 +58,24 @@ public function filterApiResources($apiResources) // List of GET parameters available for your index action. 'index_params' => array('subject_item_id', 'object_item_id', 'property_id'), ); + //Added GET only for looking up properties, TODO Post and Put + $apiResources['item_relations_vocabularies'] = array( + // Module associated with your resource. + //'module' => 'ItemRelationsPlugin', + // Controller associated with your resource. + // Type of record associated with your resource. + 'record_type' => 'ItemRelationsVocabulary', + // List of actions available for your resource. + 'actions' => array( + 'index', // GET request without ID + 'get', // GET request with ID + //'post', // POST request + //'put', // PUT request (ID is required) + //'delete', // DELETE request (ID is required) + ), + // List of GET parameters available for your index action. + 'index_params' => array('label', 'id', 'name', 'namespace_uri', 'namespace_prefix'), + ); //Added GET only for looking up properties, TODO Post and Put $apiResources['item_relations_properties'] = array( @@ -75,7 +93,7 @@ public function filterApiResources($apiResources) //'delete', // DELETE request (ID is required) ), // List of GET parameters available for your index action. - 'index_params' => array('label', 'id'), + 'index_params' => array('label', 'id', 'vocabulary_id'), ); diff --git a/models/Api/ItemRelationsVocabulary.php b/models/Api/ItemRelationsVocabulary.php new file mode 100644 index 0000000..0c9790f --- /dev/null +++ b/models/Api/ItemRelationsVocabulary.php @@ -0,0 +1,13 @@ +