hathor-cpp-scanner/app/core/routes.php

64 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2016-06-13 08:27:43 -07:00
<?php
/*
* @file routes.php
* @description
* Contains all the api routes
*/
$app->map('/', 'hathor_home')->via('GET','HEAD','OPTIONS');
//$app->get('/artists', 'hathor_get_artists')->via('GET', 'HEAD', 'OPTIONS');
//$app->get('/artist/:arid', 'hathor_get_artist')->via('GET', 'HEAD', 'OPTIONS');
//$app->get('/albums', 'hathor_get_albums')->via('GET', 'HEAD', 'OPTIONS');
$app->map('/album/:aid', 'hathor_get_album')->conditions( array('id' => '[\w\d]+') )->via('GET', 'HEAD', 'OPTIONS');
$app->map('/album/cover/:cid', 'hathor_get_cover')->via('GET','HEAD','OPTIONS');
function hathor_get_cover() {
return true;
}
/**
* /artists
* /artists/{arid}
* /artists/{arid}/albums
* /artists/{arid}/albums/{aid}
* /artists/{arid}/albums/{aid}/tracks
* /artists/{arid}/albums/{arid}/tracks/{tid}
* /artists/{arid}/albums/{arid}/tracks/{tid}/play
* /artists/{arid}/albums/{arid}/tracks/{tid}/download
*/
/**
* /albums
* /albums/{aid}
* /albums/{aid}/tracks
* /albums/{aid}/tracks/{tid}
* /albums/{aid}/tracks/{tid}/play
* /albums/{aid}/tracks/{tid}/download
*/
/**
* /tracks
* /tracks/{tid}
* /tracks/{tid}/play
* /tracks/{tid}/download
*/
/**
* /years
* /years/{year}
*/
/**
* /users
* /users/{uid}
* /users/{uid}/playlists
* /users/{uid}/playlists/{plid}
*/
/**
* /playlists
* /playlists/{plid}
*/