You are here

function user_service_service in Services 6

Same name and namespace in other branches
  1. 5 services/user_service/user_service.module \user_service_service()
  2. 6.2 services/user_service/user_service.module \user_service_service()
  3. 7 services/user_service/user_service.module \user_service_service()

Implementation of hook_service().

File

services/user_service/user_service.module, line 35
@author Services Dev Team

Code

function user_service_service() {
  return array(
    // user.delete
    array(
      '#method' => 'user.delete',
      '#callback' => 'user_service_delete',
      '#access callback' => 'user_service_delete_access',
      '#file' => array(
        'file' => 'inc',
        'module' => 'user_service',
      ),
      '#args' => array(
        array(
          '#name' => 'uid',
          '#type' => 'int',
          '#description' => t('User ID.'),
        ),
      ),
      '#return' => 'struct',
      '#help' => t('Delete an user.'),
    ),
    // user.get
    array(
      '#method' => 'user.get',
      '#callback' => 'user_service_get',
      '#access callback' => 'user_service_get_access',
      '#file' => array(
        'file' => 'inc',
        'module' => 'user_service',
      ),
      '#args' => array(
        array(
          '#name' => 'uid',
          '#type' => 'int',
          '#description' => t('User ID.'),
        ),
      ),
      '#return' => 'struct',
      '#help' => t('Get all user details.'),
    ),
    // user.login
    array(
      '#method' => 'user.login',
      '#callback' => 'user_service_login',
      '#file' => array(
        'file' => 'inc',
        'module' => 'user_service',
      ),
      '#args' => array(
        array(
          '#name' => 'username',
          '#type' => 'string',
          '#description' => t('A valid username.'),
        ),
        array(
          '#name' => 'password',
          '#type' => 'string',
          '#description' => t('A valid password.'),
        ),
      ),
      '#return' => 'struct',
      '#help' => t('Logs in a user.'),
    ),
    // user.logout
    array(
      '#method' => 'user.logout',
      '#callback' => 'user_service_logout',
      '#file' => array(
        'file' => 'inc',
        'module' => 'user_service',
      ),
      '#args' => array(),
      '#return' => 'struct',
      '#help' => t('Logs out a user.'),
    ),
    // user.save
    array(
      '#method' => 'user.save',
      '#callback' => 'user_service_save',
      '#access callback' => 'user_service_save_access',
      '#file' => array(
        'file' => 'inc',
        'module' => 'user_service',
      ),
      '#args' => array(
        array(
          '#name' => 'uid',
          '#type' => 'int',
          '#description' => t('User ID.'),
        ),
      ),
      '#return' => 'struct',
      '#help' => t('Save user details.'),
    ),
  );
}