server/src/routes/api.php
author ymh <ymh.work@gmail.com>
Tue, 04 Oct 2016 11:58:39 +0200
changeset 319 78990a8a069b
parent 308 e032d686d88e
child 424 feb0d3e0fef9
permissions -rw-r--r--
Work on front and back integration, correct the expected data format

<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
|
*/
Route::group(['prefix' => 'v1'] , function() {

    Route::pattern('id', ".*");
    Route::get('documents/{id}/transcript', 'Api\DocumentController@transcript');
    Route::resource('documents', 'Api\DocumentController', [
            'only' => ['index', 'show', 'update']
    ]);


    Route::group(['prefix' => 'resolvers'], function() {
        Route::get('viaf/{id}', 'Api\ViafController@show');
        Route::get('lexvo/{id}', 'Api\LexvoController@show');
        Route::get('bnf/{id}', 'Api\BnfController@show');
        Route::get('geonames/{id}', 'Api\GeonamesController@show');
    });


    Route::group(['prefix' => 'stats'], function() {
        Route::get('languages', 'Api\LanguageController@index');
        Route::get('themes', 'Api\ThemeController@index');
        Route::get('discourses', 'Api\DiscourseController@index');
        Route::get('datestats', 'Api\DateStatsController@index');
        Route::get('geostats', 'Api\GeoStatsController@index');
    });
});