function push_notifications_services_resources in Push Notifications 7
Implements hook_services_resources().
File
- ./
push_notifications.module, line 179 - Push Notifications functionality.
Code
function push_notifications_services_resources() {
return array(
'push_notifications' => array(
'create' => array(
'help' => 'Registers a device token. For type, pass \'ios\' for iOS devices and \'android\' for Android devices.',
'callback' => '_push_notifications_service_create_device_token',
'file' => array(
'type' => 'inc',
'module' => 'push_notifications',
'name' => 'includes/push_notifications.service',
),
'access arguments' => array(
'register device token',
),
'access arguments append' => FALSE,
'args' => array(
array(
'name' => 'token',
'type' => 'string',
'description' => 'Device Token',
'optional' => FALSE,
'source' => 'data',
),
array(
'name' => 'type',
'type' => 'string',
'description' => 'Device Type',
'optional' => FALSE,
'source' => 'data',
),
array(
'name' => 'language',
'type' => 'string',
'description' => 'Language',
'optional' => TRUE,
'source' => 'data',
),
),
),
'delete' => array(
'help' => 'Removes a registered a device token. Only needs the token.',
'callback' => '_push_notifications_service_delete_device_token',
'file' => array(
'type' => 'inc',
'module' => 'push_notifications',
'name' => 'includes/push_notifications.service',
),
'access arguments' => array(
'remove device token',
),
'access arguments append' => FALSE,
'args' => array(
array(
'name' => 'token',
'type' => 'string',
'description' => 'Device Token',
'optional' => FALSE,
'source' => array(
'path' => '0',
),
),
),
),
),
);
}