1

I'm adding Services integration to the room_reservations module. I added the hook to the module like this:

room_reservations.module

function room_reservations_services_resources(){
  $room_service = array(
    'room_reservations'=>array(
      'operations'=>array(
        'retrieve'=>array(
          'help'=>'Gets the hours and the days reservations can be made',
          'file'=>array(
            'type'=>'inc',
            'module'=>'room_reservations',
            'name'=>'room_reservations'
            ),
          'callback'=>'_room_reservations_facility_hours',
          'access arguments'=>array('get reservation hours'),
          'access arguments append'=>FALSE,
          'args'=>array(
            'name'=>'reset',
            'type'=>'string',
            'description'=>'reset',
            'optional'=>TRUE,
            'source'=>'data'
            ),
          ),
        ),
      ),
    );
  return $room_service;
}

Am I doing something wrong? I don't see the custom service.

Also, by reading the docs on the Services module, could this be done as an action? if so how?

Thanks in advance.

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.