<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/


$app->get('/', function () use ($app) {
    return redirect('docs');
});

$app->get( 'rss/podcasts', 'PodcastController@rss' );

$app->get( 'menu/special', 'MenuController@special' );

$app->get('nieuws/overzicht', 'NewsController@newslist' );
$app->get('nieuws/regio/{region:[a-z0-9-]+}', 'NewsController@regionlist' );
$app->get('nieuws/thema/{theme:[a-z0-9-]+}', 'NewsController@themelist' );
$app->get('nieuws/zoeken/{query}', 'NewsController@findnews' );
$app->get('nieuws/populair', 'NewsController@popularNews' );
$app->get('nieuws/bericht/{id:\d+}', 'NewsController@newsitem' );
$app->get('nieuws/regionieuws', 'PodcastController@latestNews' );

$app->get('agenda/overzicht[/week]', 'NewsController@calendarlist' );
$app->get('agenda/item/{id:\d+}', 'NewsController@calendaritem' );
$app->get('agenda/populair', 'NewsController@popularCalendar' );

$app->get('blog/overzicht/{from:\d\d\d\d-\d\d?-\d\d?}/{to:\d\d\d\d-\d\d?-\d\d?}', 'NewsController@bloglist' );

$app->get('podcast/overzicht', 'PodcastController@overview' );
$app->get('podcast/details/{id:\d+}', 'PodcastController@details' );
$app->get('podcast/zoeken/{query}', 'PodcastController@findpodcast' );
$app->get('podcast/programma/{id:\d+}', 'PodcastController@program' );
$app->get('podcast/download/{id:\d+}/{title}', 'PodcastController@download' );
$app->get('podcast/stream/{id:\d+}/{title}', 'PodcastController@stream' );

$app->get('programma/schema/onair', 'ProgramController@onair' );
$app->get('programma/schema/nustraks', 'ProgramController@comingup' );
$app->get('programma/schema/week[/{shiftWeeks:-?\d+}]', 'ProgramController@schedule' );
$app->get('programma/schema/maand/{year:20\d\d}/{month:\d\d?}', 'ProgramController@month' );
$app->get('programma/schema/periode/{from:\d\d\d\d-\d\d?-\d\d?}/{to:\d\d\d\d-\d\d?-\d\d?}', 'ProgramController@period' );
$app->get('programma/details/{id:\d+}', 'ProgramController@details' );

$app->get('programma/download/{year:20\d\d}/{month:\d\d?}/{day:\d\d?}/{hour:\d\d?}/{duration:\d\d?}', 'PodcastController@complete');

$app->get('kerkdienst', 'KerkdienstController@get');
$app->get('kerkdienst/stream', 'KerkdienstController@podcast');
$app->get('kerkdienst/download', 'KerkdienstController@download');

$app->get('special/stmaarten', 'SpecialController@stMaarten');
// live/onair
// live/stream
