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