server/src/routes/api.php
author ymh <ymh.work@gmail.com>
Tue, 15 Nov 2016 17:42:57 +0100
changeset 424 feb0d3e0fef9
parent 319 78990a8a069b
child 569 2815e71c65fb
permissions -rw-r--r--
add dynamic date range calculation for dates, and add color gradient component, add color gradient for language and chrono
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
280
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
use Illuminate\Http\Request;
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
/*
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
|--------------------------------------------------------------------------
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
| API Routes
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
|--------------------------------------------------------------------------
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
|
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
|
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
*/
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
Route::group(['prefix' => 'v1'] , function() {
305
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    13
319
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    14
    Route::pattern('id', ".*");
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    15
    Route::get('documents/{id}/transcript', 'Api\DocumentController@transcript');
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    16
    Route::resource('documents', 'Api\DocumentController', [
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    17
            'only' => ['index', 'show', 'update']
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    18
    ]);
305
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    19
280
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
305
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    21
    Route::group(['prefix' => 'resolvers'], function() {
319
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    22
        Route::get('viaf/{id}', 'Api\ViafController@show');
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    23
        Route::get('lexvo/{id}', 'Api\LexvoController@show');
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    24
        Route::get('bnf/{id}', 'Api\BnfController@show');
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    25
        Route::get('geonames/{id}', 'Api\GeonamesController@show');
305
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    26
    });
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    27
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    28
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    29
    Route::group(['prefix' => 'stats'], function() {
319
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    30
        Route::get('languages', 'Api\LanguageController@index');
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    31
        Route::get('themes', 'Api\ThemeController@index');
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    32
        Route::get('discourses', 'Api\DiscourseController@index');
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    33
        Route::get('datestats', 'Api\DateStatsController@index');
424
feb0d3e0fef9 add dynamic date range calculation for dates, and add color gradient component, add color gradient for language and chrono
ymh <ymh.work@gmail.com>
parents: 319
diff changeset
    34
        Route::get('dateminmax', 'Api\DateStatsController@minmax');
319
78990a8a069b Work on front and back integration, correct the expected data format
ymh <ymh.work@gmail.com>
parents: 308
diff changeset
    35
        Route::get('geostats', 'Api\GeoStatsController@index');
305
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    36
    });
307
07b44a378ad8 Add the datestats api
ymh <ymh.work@gmail.com>
parents: 305
diff changeset
    37
});