Controller list functies hernoemd naar overview ivm PHP syntax-fout. Host verwijderd uit api.json
This commit is contained in:
@@ -32,7 +32,7 @@ QUERY;
|
|||||||
/**
|
/**
|
||||||
* Lijst van alle agendaberichten
|
* Lijst van alle agendaberichten
|
||||||
*/
|
*/
|
||||||
public function list(int $daysAhead = 0) {
|
public function overview(int $daysAhead = 0) {
|
||||||
$sql = self::$BASE_SQL;
|
$sql = self::$BASE_SQL;
|
||||||
if($daysAhead > 0) {
|
if($daysAhead > 0) {
|
||||||
$until = 'CURRENT_DATE() + INTERVAL ' . $daysAhead . ' DAY';
|
$until = 'CURRENT_DATE() + INTERVAL ' . $daysAhead . ' DAY';
|
||||||
@@ -56,15 +56,15 @@ QUERY;
|
|||||||
/**
|
/**
|
||||||
* Lijst van alle agendaberichten in de komende 7 dagen
|
* Lijst van alle agendaberichten in de komende 7 dagen
|
||||||
*/
|
*/
|
||||||
public function listWeek() {
|
public function overviewWeek() {
|
||||||
return $this->list(7);
|
return $this->overview(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lijst van alle agendaberichten in de komende 30 dagen
|
* Lijst van alle agendaberichten in de komende 30 dagen
|
||||||
*/
|
*/
|
||||||
public function listMonth() {
|
public function overviewMonth() {
|
||||||
return $this->list(30);
|
return $this->overview(30);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ QUERY;
|
|||||||
/**
|
/**
|
||||||
* Lijst van alle nieuwsberichten
|
* Lijst van alle nieuwsberichten
|
||||||
*/
|
*/
|
||||||
public function list(Request $request) {
|
public function overview(Request $request) {
|
||||||
$count = (int)$request->get('aantal', 15);
|
$count = (int)$request->get('aantal', 15);
|
||||||
$page = (int)$request->get('pagina', 1);
|
$page = (int)$request->get('pagina', 1);
|
||||||
if($count <= 0 || $page <= 0) {
|
if($count <= 0 || $page <= 0) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ QUERY;
|
|||||||
/**
|
/**
|
||||||
* Lijst van alle podcasts
|
* Lijst van alle podcasts
|
||||||
*/
|
*/
|
||||||
public function list(Request $request) {
|
public function overview(Request $request) {
|
||||||
$count = (int)$request->get('aantal', 15);
|
$count = (int)$request->get('aantal', 15);
|
||||||
$page = (int)$request->get('pagina', 1);
|
$page = (int)$request->get('pagina', 1);
|
||||||
if($count <= 0 || $page <= 0) {
|
if($count <= 0 || $page <= 0) {
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ info:
|
|||||||
#license:
|
#license:
|
||||||
# name: 'Apache 2.0'
|
# name: 'Apache 2.0'
|
||||||
# url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
|
# url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
|
||||||
host: 'api.6fm.nl'
|
|
||||||
basePath: '/'
|
basePath: '/'
|
||||||
tags:
|
tags:
|
||||||
- name: 'nieuws'
|
- name: 'nieuws'
|
||||||
|
|||||||
@@ -15,16 +15,16 @@ $app->get('/', function () use ($app) {
|
|||||||
return redirect('docs');
|
return redirect('docs');
|
||||||
});
|
});
|
||||||
|
|
||||||
$app->get('nieuws/overzicht', 'NewsController@list' );
|
$app->get('nieuws/overzicht', 'NewsController@overview' );
|
||||||
$app->get('nieuws/bericht/{id:\d+}', 'NewsController@item' );
|
$app->get('nieuws/bericht/{id:\d+}', 'NewsController@item' );
|
||||||
|
|
||||||
$app->get('agenda/overzicht[/week]', 'AgendaController@listWeek' );
|
$app->get('agenda/overzicht[/week]', 'AgendaController@overviewWeek' );
|
||||||
$app->get('agenda/overzicht/maand', 'AgendaController@listMonth' );
|
$app->get('agenda/overzicht/maand', 'AgendaController@overviewMonth' );
|
||||||
$app->get('agenda/overzicht/alles', 'AgendaController@list' );
|
$app->get('agenda/overzicht/alles', 'AgendaController@overview' );
|
||||||
$app->get('agenda/kalender[/{year:\d\d\d\d}/{month:\d\d?}]', 'AgendaController@calendar' );
|
$app->get('agenda/kalender[/{year:\d\d\d\d}/{month:\d\d?}]', 'AgendaController@calendar' );
|
||||||
$app->get('agenda/details/{id:\d+}', 'AgendaController@item' );
|
$app->get('agenda/details/{id:\d+}', 'AgendaController@item' );
|
||||||
|
|
||||||
$app->get('podcast/overzicht', 'PodcastController@list' );
|
$app->get('podcast/overzicht', 'PodcastController@overview' );
|
||||||
// podcast/programma/1234[?aantal=&pagina=]
|
// podcast/programma/1234[?aantal=&pagina=]
|
||||||
$app->get('podcast/download/{id:\d+}/[{title}]', 'PodcastController@download' );
|
$app->get('podcast/download/{id:\d+}/[{title}]', 'PodcastController@download' );
|
||||||
$app->get('podcast/stream/{id:\d+}/[{title}]', 'PodcastController@stream' );
|
$app->get('podcast/stream/{id:\d+}/[{title}]', 'PodcastController@stream' );
|
||||||
|
|||||||
Reference in New Issue
Block a user