server/src/routes/api.php
author ymh <ymh.work@gmail.com>
Wed, 28 Sep 2016 15:58:18 +0200
changeset 305 ff6cf3fc5f40
parent 304 20071981ba2a
child 307 07b44a378ad8
permissions -rw-r--r--
api reorganisation and propagation if the changes + some code cleaning
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
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    14
    Route::group(['prefix' => 'documents'], function() {
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    15
        Route::pattern('id', ".*");
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    16
        Route::get('{id}/transcript', 'Api\DocumentController@transcript');
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    17
        Route::resource('', 'Api\DocumentController',
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    18
                        ['only' => ['index', 'show', 'update']]);
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    19
    });
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    20
280
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
305
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    22
    Route::group(['prefix' => 'resolvers'], function() {
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    23
        Route::resource('viaf', 'Api\ViafController',
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    24
                        ['only' => ['show']]);
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    25
        Route::resource('lexvo', 'Api\LexvoController',
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    26
                        ['only' => ['show']]);
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    27
        Route::resource('bnf', 'Api\BnfController',
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    28
                        ['only' => ['index','show']]);
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    29
        Route::resource('geonames', 'Api\GeonamesController',
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    30
                        ['only' => ['index','show']]);
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    31
    });
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    32
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    33
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    34
    Route::group(['prefix' => 'stats'], function() {
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    35
        Route::resource('languages', 'Api\LanguageController',
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    36
                        ['only' => ['index']]);
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    37
        Route::resource('themes', 'Api\ThemeController',
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    38
                        ['only' => ['index']]);
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    39
        Route::resource('discourses', 'Api\DiscourseController',
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    40
                        ['only' => ['index']]);
ff6cf3fc5f40 api reorganisation and propagation if the changes + some code cleaning
ymh <ymh.work@gmail.com>
parents: 304
diff changeset
    41
    });
280
59a2c10ac9b8 upgrade laravel to 5.3.10
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
});