Created
April 11, 2012 10:04
-
-
Save linuslundahl/2358357 to your computer and use it in GitHub Desktop.
Services resource definition
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
$resources['ur_segment'] = array( | |
'operations' => array( | |
'create' => array( | |
'callback' => '_ur_segment_create', | |
'help' => t('Creates a segment.'), | |
'args' => array( | |
array( | |
'name' => 'segment', | |
'optional' => FALSE, | |
'source' => 'data', | |
'description' => 'The data for the segment to create', | |
'type' => 'array', | |
), | |
), | |
'access callback' => 'ne_product_user_has_access', | |
'access arguments' => array('ur'), | |
'access arguments append' => FALSE, | |
), | |
'delete' => array( | |
'callback' => '_ur_segment_delete', | |
'help' => t('Deletes a segment.'), | |
'args' => array( | |
array( | |
'name' => 'id', | |
'optional' => FALSE, | |
'source' => array('path' => 0), | |
'description' => 'The id of the segment to delete', | |
'type' => 'int', | |
), | |
array( | |
'name' => 'media_id', | |
'optional' => FALSE, | |
'source' => array('param' => 'media_id'), | |
'description' => 'The id of the segment to add a link to', | |
'type' => 'int', | |
), | |
), | |
'access callback' => '_ne_ur_segment_delete_access', | |
'access arguments append' => TRUE, | |
), | |
), | |
'targeted_actions' => array( | |
'link' => array( | |
'callback' => '_ur_segment_add_link', | |
'help' => t('Adds a link to a segment.'), | |
'args' => array( | |
array( | |
'name' => 'id', | |
'optional' => FALSE, | |
'source' => array('path' => 0), | |
'description' => 'The id of the segment to add a link to', | |
'type' => 'int', | |
), | |
array( | |
'name' => 'data', | |
'optional' => FALSE, | |
'source' => 'data', | |
'description' => 'The link info', | |
'type' => 'array', | |
), | |
), | |
'access callback' => '_ne_ur_segment_delete_access', | |
'access arguments append' => TRUE, | |
), | |
), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment