You are here

function shurly_service_menu in ShURLy 8

Same name and namespace in other branches
  1. 6 shurly_service/shurly_service.module \shurly_service_menu()
  2. 7 shurly_service/shurly_service.module \shurly_service_menu()

Implements hook_menu().

File

shurly_service/shurly_service.module, line 31
Link ShURLy functionalities to services module. @todo add option to rate limit requests @todo add option for user api keys

Code

function shurly_service_menu() {
  $items = [];
  $items['shurly/api/shorten'] = [
    'file' => 'shurly_service.inc',
    'page callback' => 'shurly_service_shorten',
    'access callback' => 'shurly_service_access_api_key',
    'type' => MENU_CALLBACK,
  ];
  $items['shurly/api/expand'] = [
    'file' => 'shurly_service.inc',
    'page callback' => 'shurly_service_expand',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  ];
  return $items;
}