You are here

function mediafront_service in MediaFront 7

Same name and namespace in other branches
  1. 6.2 mediafront.module \mediafront_service()
  2. 6 mediafront.module \mediafront_service()

Implements hook_service()

File

./mediafront.module, line 219

Code

function mediafront_service() {
  return array(
    array(
      '#method' => 'mediafront.getPlaylist',
      '#callback' => 'mediafront_get_playlist',
      '#access arguments' => array(
        'access content',
      ),
      '#key' => FALSE,
      '#args' => array(
        array(
          '#name' => 'playlist',
          '#type' => 'string',
          '#description' => t('Playlist name.'),
        ),
        array(
          '#name' => 'limit',
          '#type' => 'int',
          '#optional' => TRUE,
          '#description' => t('The limit for the view to show.'),
        ),
        array(
          '#name' => 'page',
          '#type' => 'int',
          '#optional' => TRUE,
          '#description' => t('The page number to show.'),
        ),
        array(
          '#name' => 'args',
          '#type' => 'array',
          '#optional' => TRUE,
          '#description' => t('An array of arguments to pass to the view.'),
        ),
      ),
      '#return' => 'array',
      '#help' => t('Retrieves a playlist.'),
    ),
    array(
      '#method' => 'mediafront.getNode',
      '#callback' => 'mediafront_get_node',
      '#access arguments' => array(
        'access content',
      ),
      '#key' => FALSE,
      '#args' => array(
        array(
          '#name' => 'nid',
          '#type' => 'int',
          '#description' => t('The node Id for the node you wish to get.'),
        ),
        array(
          '#name' => 'args',
          '#type' => 'array',
          '#optional' => TRUE,
          '#description' => t('An array of arguments to pass to the node.'),
        ),
      ),
      '#return' => 'array',
      '#help' => t('Retrieves a node.'),
    ),
  );
}