You are here

function farm_api_menu in farmOS 7

Implements hook_menu().

File

modules/farm/farm_api/farm_api.module, line 30
Farm API module.

Code

function farm_api_menu() {
  $items = array();

  // General farm information JSON endpoint.
  $items['farm.json'] = array(
    'page callback' => 'farm_api_info',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );

  // OAuth client configuration form.
  $items['admin/config/farm/oauth'] = array(
    'title' => 'farmOS OAuth',
    'description' => 'farmOS OAuth Client settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'farm_api_oauth_settings_form',
    ),
    'access arguments' => array(
      'administer farm api oauth clients',
    ),
    'file' => 'farm_api.oauth.inc',
  );
  return $items;
}